Skip to content

Commit

Permalink
improve: auto foss tag for apps being marked as foss
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza417 committed Jan 15, 2025
1 parent 854422e commit 6defca1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
34 changes: 26 additions & 8 deletions app/src/main/assets/html/changelogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,36 @@ <h1>Change Logs</h1>

<!-- Write change logs here -->
<sub>(Current Version)</sub>
<h2>Build10X.0.0</h2>

<h4>Bug Fixes</h4>

<ul>
<li>Fixed floating menus having huge heights in some devices.</li>
</ul>

<h4>Behaviour</h4>

<ul>
<li>Marking an app as FOSS should also assign a FOSS tag to the app.</li>
</ul>

<br/>

<!-- //////////////////////////////////////////////////////////// Older Versions //////////////////////////////////////////////////////////// -->

<hr/>
<h4 style="text-align: center;">Previous Versions</h4>
<br/>

<h2>Build102.0.0</h2>

<h4>User Interface</h4>

<ul>
<li>Added new filter flags <i>Launchable</i>, <i>Large Heap</i>, and <i>Stopped</i> in <b>Apps</b> panel.</li>
<li>Added new filter flags <i>Launchable</i>, <i>Large Heap</i>, and <i>Stopped</i> in
<b>Apps</b> panel.
</li>
<li>Added AND or OR logics for filter flags in <b>Apps Filter</b> dialog.</li>
<li>Added tracker indicator on Dex classes.
<br>
Expand Down Expand Up @@ -80,13 +104,7 @@ <h4>Analytics</h4>
<li>Added option to toggle chart labels in <b>Analytics</b> panel.</li>
</ul>

<br/>

<!-- //////////////////////////////////////////////////////////// Older Versions //////////////////////////////////////////////////////////// -->

<hr/>
<h4 style="text-align: center;">Previous Versions</h4>
<br/>
<br>

<h2>Build101.0.0</h2>

Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/app/simple/inure/dialogs/app/AppMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import app.simple.inure.apk.parsers.FOSSParser
import app.simple.inure.apk.utils.PackageUtils.launchThisPackage
import app.simple.inure.apk.utils.PackageUtils.safeApplicationInfo
import app.simple.inure.constants.BundleConstants
import app.simple.inure.database.instances.TagsDatabase
import app.simple.inure.decorations.ripple.DynamicRippleTextView
import app.simple.inure.decorations.typeface.TypeFaceTextView
import app.simple.inure.decorations.views.AppIconImageView
Expand Down Expand Up @@ -307,6 +308,13 @@ class AppMenu : ScopedDialogFragment() {
childFragmentManager.showMarkFossDialog().onMarkFossSaved = { license ->
viewLifecycleOwner.lifecycleScope.launch(Dispatchers.Default) {
FOSSParser.addPackage(packageInfo.packageName, license, requireContext())
TagsDatabase.getInstance(requireContext())?.let {
it.getTagDao()?.getTag(getString(R.string.foss))?.let { tag ->
tag.packages = tag.packages.plus("," + packageInfo.packageName)
it.getTagDao()?.updateTag(tag)
}
}

withContext(Dispatchers.Main) {
setOpenSourceState(false)
}
Expand Down

0 comments on commit 6defca1

Please sign in to comment.