Skip to content

Commit

Permalink
Do not enable update checker when allowing push notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Drumber committed Apr 29, 2024
1 parent db061a1 commit 1993943
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import io.github.drumber.kitsune.ui.authentication.AuthenticationActivity
import io.github.drumber.kitsune.ui.base.BaseActivity
import io.github.drumber.kitsune.ui.permissions.requestNotificationPermission
import io.github.drumber.kitsune.ui.permissions.showNotificationPermissionRejectedDialog
import io.github.drumber.kitsune.util.ui.RoundBitmapDrawable
import io.github.drumber.kitsune.util.extensions.setStatusBarColorRes
import io.github.drumber.kitsune.util.ui.RoundBitmapDrawable
import io.github.drumber.kitsune.util.ui.getSystemBarsAndCutoutInsets
import org.koin.android.ext.android.get
import org.koin.androidx.viewmodel.ext.android.viewModel
Expand Down Expand Up @@ -206,7 +206,6 @@ class MainActivity : BaseActivity(R.layout.activity_main) {
val requestNotificationPermissionLauncher =
registerForActivityResult(RequestPermission()) { isGranted ->
if (isGranted) {
KitsunePref.checkForUpdatesOnStart = true
KitsunePref.flagUserDeniedNotificationPermission = false
} else {
KitsunePref.checkForUpdatesOnStart = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class SettingsFragment : BasePreferenceFragment() {
val preference =
findPreference<SwitchPreferenceCompat>(R.string.preference_key_check_for_updates_on_start)
if (isGranted) {
preference?.isChecked = true
KitsunePref.flagUserDeniedNotificationPermission = false
} else {
preference?.isChecked = false
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/app_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
android:key="@string/preference_key_check_for_updates_on_start"
android:title="@string/preference_check_for_updates"
android:summary="@string/preference_check_for_updates_description"
android:defaultValue="true"
android:defaultValue="false"
app:iconSpaceReserved="false" />

<Preference
Expand Down

0 comments on commit 1993943

Please sign in to comment.