fix: adjust preference change handling in SettingsActivity

Corrected the preference change handling logic by fixing spacing
issues and updating the use of `Snackbar` to target the correct
view. Enhanced readability by addressing minor formatting
inconsistencies. These changes improve code clarity and maintain
correct functionality of encryption and backup service settings.
This commit is contained in:
Kumi 2024-09-17 11:34:38 +02:00
parent d7b6de13c8
commit e056503626
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -187,7 +187,7 @@ public class SettingsActivity extends BackgroundTaskActivity<ChangeEncryptionTas
(settings.getAndroidBackupServiceEnabled() ? "enabled" : "disabled"));
int message = settings.getAndroidBackupServiceEnabled() ? R.string.settings_toast_android_sync_enabled : R.string.settings_toast_android_sync_disabled;
Snackbar.make(fragment.getView(), message, BaseTransientBottomBar.LENGTH_SHORT).show();
Snackbar.make(findViewById(android.R.id.content), message, BaseTransientBottomBar.LENGTH_SHORT).show();
}
fragment.updateAutoBackup();