[#13230] Show default syncing interval

This commit is contained in:
Roman Volosovskyi 2022-03-30 14:27:54 +02:00
parent c40094f2f9
commit 7a964fde29
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 6 additions and 2 deletions

View File

@ -21,7 +21,9 @@
:on-press #(re-frame/dispatch [:multiaccounts.ui/default-sync-period-switched id])}]) :on-press #(re-frame/dispatch [:multiaccounts.ui/default-sync-period-switched id])}])
(views/defview default-sync-period-settings [] (views/defview default-sync-period-settings []
(views/letsubs [{:keys [default-sync-period]} [:multiaccount]] (views/letsubs [{:keys [default-sync-period]
:or {default-sync-period constants/one-day}}
[:multiaccount]]
[react/view {:margin-top 8} [react/view {:margin-top 8}
(when config/two-minutes-syncing? (when config/two-minutes-syncing?
[radio-item constants/two-mins default-sync-period]) [radio-item constants/two-mins default-sync-period])

View File

@ -42,7 +42,9 @@
:accessory-text (cond :accessory-text (cond
(= default-sync-period constants/two-mins) (= default-sync-period constants/two-mins)
(i18n/label :t/two-minutes) (i18n/label :t/two-minutes)
(= default-sync-period constants/one-day) (or
(nil? default-sync-period)
(= default-sync-period constants/one-day))
(i18n/label :t/one-day) (i18n/label :t/one-day)
(= default-sync-period constants/three-days) (= default-sync-period constants/three-days)
(i18n/label :t/three-days) (i18n/label :t/three-days)