add a menu button for refreshing caldav accounts manually

This commit is contained in:
tibbi 2017-08-20 19:45:13 +02:00
parent c5a45a96b9
commit d766aaed70
18 changed files with 27 additions and 0 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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