add a menu button for refreshing caldav accounts manually
This commit is contained in:
parent
c5a45a96b9
commit
d766aaed70
18 changed files with 27 additions and 0 deletions
|
@ -130,6 +130,7 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||
menuInflater.inflate(R.menu.menu_main, menu)
|
||||
menu.findItem(R.id.filter).isVisible = mShouldFilterBeVisible
|
||||
menu.findItem(R.id.go_to_today).isVisible = shouldGoToTodayBeVisible()
|
||||
menu.findItem(R.id.refresh_caldav_accounts).isVisible = config.caldavSync
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -138,6 +139,7 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||
R.id.change_view -> showViewDialog()
|
||||
R.id.go_to_today -> goToToday()
|
||||
R.id.filter -> showFilterDialog()
|
||||
R.id.refresh_caldav_accounts -> refreshCalDAVAccounts()
|
||||
R.id.add_holidays -> addHolidays()
|
||||
R.id.import_events -> tryImportEvents()
|
||||
R.id.export_events -> tryExportEvents()
|
||||
|
@ -211,6 +213,10 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||
}
|
||||
}
|
||||
|
||||
private fun refreshCalDAVAccounts() {
|
||||
|
||||
}
|
||||
|
||||
private fun addHolidays() {
|
||||
val items = getHolidayRadioItems()
|
||||
RadioGroupDialog(this, items, -1) {
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
android:icon="@drawable/ic_filter"
|
||||
android:title="@string/filter"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/refresh_caldav_accounts"
|
||||
android:icon="@drawable/ic_repeat"
|
||||
android:title="@string/refresh_caldav_accounts"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/add_holidays"
|
||||
android:title="@string/add_holidays"
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -201,6 +201,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minutę</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Selecione os calendários a sincronizar</string>
|
||||
<string name="manage_synced_calendars">Gerir calendários sincronizados</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minuto</item>
|
||||
|
|
|
@ -210,6 +210,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d минута</item>
|
||||
|
|
|
@ -203,6 +203,7 @@
|
|||
<string name="select_caldav_calendars">Zvoľte kalendáre pre synchronizáciu</string>
|
||||
<string name="manage_synced_calendars">Spravovať synchronizované kalendáre</string>
|
||||
<string name="store_locally_only">Uložiť iba lokálne</string>
|
||||
<string name="refresh_caldav_accounts">Obnoviť CalDAV účty Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minútu</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minut</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="select_caldav_calendars">Select calendars to sync</string>
|
||||
<string name="manage_synced_calendars">Manage synced calendars</string>
|
||||
<string name="store_locally_only">Store locally only</string>
|
||||
<string name="refresh_caldav_accounts">Refresh CalDAV accounts</string>
|
||||
|
||||
<plurals name="by_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
|
|
Loading…
Reference in a new issue