Skip to content

Commit

Permalink
fix: 3回以上ダイアログが表示されないようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
pantasystem committed Nov 19, 2023
1 parent e52e86a commit 8cce9ac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class SafeSearchDescriptionDialog : DialogFragment() {
dismiss()
}
.setNegativeButton(R.string.safe_search_description_dialog_negative_button) { _, _ ->
preferences.edit().putInt("counter", preferences.getInt("counter", 0) + 1).apply()
if (preferences.getInt("counter", 0) >= 3) {
if (preferences.getInt("counter", 0) >= 2) {
mainViewModel.onDoNotShowSafeSearchDescription()
}
preferences.edit().putInt("counter", preferences.getInt("counter", 0) + 1).apply()
// 何もしない
dismiss()
}
Expand Down

0 comments on commit 8cce9ac

Please sign in to comment.