show a confirmation dialog before enabling Google Sync mentioning beta feature

This commit is contained in:
tibbi
2017-07-12 23:46:04 +02:00
parent 835d9d5f83
commit cfeaf7bfc8
16 changed files with 31 additions and 5 deletions

View File

@@ -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 {

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>