mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
show a confirmation dialog before enabling Google Sync mentioning beta feature
This commit is contained in:
@@ -25,6 +25,7 @@ import com.simplemobiletools.calendar.extensions.*
|
||||
import com.simplemobiletools.calendar.helpers.FONT_SIZE_LARGE
|
||||
import com.simplemobiletools.calendar.helpers.FONT_SIZE_MEDIUM
|
||||
import com.simplemobiletools.calendar.helpers.FONT_SIZE_SMALL
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
@@ -115,15 +116,25 @@ class SettingsActivity : SimpleActivity() {
|
||||
private fun setupGoogleSync() {
|
||||
settings_google_sync.isChecked = config.googleSync
|
||||
settings_google_sync_holder.setOnClickListener {
|
||||
settings_google_sync.toggle()
|
||||
config.googleSync = settings_google_sync.isChecked
|
||||
|
||||
if (settings_google_sync.isChecked) {
|
||||
tryEnablingSync()
|
||||
if (!config.googleSync) {
|
||||
ConfirmationDialog(this, getString(R.string.google_sync_testing), positive = R.string.ok, negative = 0) {
|
||||
toggleGoogleSync()
|
||||
}
|
||||
} else {
|
||||
toggleGoogleSync()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleGoogleSync() {
|
||||
settings_google_sync.toggle()
|
||||
config.googleSync = settings_google_sync.isChecked
|
||||
|
||||
if (settings_google_sync.isChecked) {
|
||||
tryEnablingSync()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupSundayFirst() {
|
||||
settings_sunday_first.isChecked = config.isSundayFirst
|
||||
settings_sunday_first_holder.setOnClickListener {
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Mostrar eventos passados</string>
|
||||
<string name="snooze_delay">Adiar lembrete com a opção Snooze</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minuto</item>
|
||||
|
@@ -203,6 +203,7 @@
|
||||
<string name="display_past_events">Показывать прошедшие события</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d минута</item>
|
||||
|
@@ -196,6 +196,7 @@
|
||||
<string name="display_past_events">Zobraziť minulé udalosti spred</string>
|
||||
<string name="snooze_delay">Posunúť pripomienku s Odložiť o</string>
|
||||
<string name="widgets">Widgety</string>
|
||||
<string name="google_sync_testing">Google synchronizácia je v testovacej prevádzke, nahlásenie akýchkoľvek ohlasov na hello@simplemobiletools.com je vítané. Vďaka!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minútu</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Visa tidigare händelser</string>
|
||||
<string name="snooze_delay">Skjut upp påminnelse med Snooza</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minut</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
@@ -189,6 +189,7 @@
|
||||
<string name="display_past_events">Display events from the past</string>
|
||||
<string name="snooze_delay">Postpone reminder with Snooze by</string>
|
||||
<string name="widgets">Widgets</string>
|
||||
<string name="google_sync_testing">Google sync is in a testing mode, reporting any feedback at hello@simplemobiletools.com would be appreciated. Thanks!</string>
|
||||
|
||||
<plurals name="minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
Reference in New Issue
Block a user