Skip to content

Commit

Permalink
good one
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Jun 21, 2024
1 parent 759ee4a commit 3661df2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ import java.net.UnknownHostException

fun clearDownloadedApks(context: Context) {
// technically we should be using the activity results but it was too inconsistent for my liking
val performCleanup = PreferenceUtils.get(context).getBoolean(PreferenceUtils.Key.CLEANUP_APKS)
val preferenceUtils = PreferenceUtils.get(context)
val performCleanup = preferenceUtils.getBoolean(PreferenceUtils.Key.CLEANUP_APKS)
if (!performCleanup) {
return
}
Expand All @@ -57,6 +58,8 @@ fun clearDownloadedApks(context: Context) {
}?.forEach {
it.delete()
}

preferenceUtils.setBoolean(PreferenceUtils.Key.CLEANUP_APKS, false)
}

fun generateInstallIntent(uri: Uri): Intent {
Expand Down

0 comments on commit 3661df2

Please sign in to comment.