Add sync history for 2 mins option for testing purposes

This commit is contained in:
Roman Volosovskyi 2021-12-21 13:23:55 +02:00
parent e5ff46fdd5
commit de3c08ba18
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
8 changed files with 14 additions and 2 deletions

1
.env
View File

@ -32,3 +32,4 @@ METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1 DELETE_MESSAGE_ENABLED=1
COLLECTIBLES_ENABLED=1 COLLECTIBLES_ENABLED=1
COMMANDS_ENABLED=1 COMMANDS_ENABLED=1
TWO_MINUTES_SYNCING=1

View File

@ -33,3 +33,4 @@ COMMUNITIES_ENABLED=1
COMMUNITIES_MANAGEMENT_ENABLED=1 COMMUNITIES_MANAGEMENT_ENABLED=1
METRICS_ENABLED=0 METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1 DELETE_MESSAGE_ENABLED=1
TWO_MINUTES_SYNCING=1

View File

@ -35,3 +35,4 @@ COMMUNITIES_ENABLED=1
COMMUNITIES_MANAGEMENT_ENABLED=1 COMMUNITIES_MANAGEMENT_ENABLED=1
METRICS_ENABLED=0 METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1 DELETE_MESSAGE_ENABLED=1
TWO_MINUTES_SYNCING=1

View File

@ -146,6 +146,7 @@
(def ^:const timeline-chat-id "@timeline70bd746ddcc12beb96b2c9d572d0784ab137ffc774f5383e50585a932080b57cca0484b259e61cecbaa33a4c98a300a") (def ^:const timeline-chat-id "@timeline70bd746ddcc12beb96b2c9d572d0784ab137ffc774f5383e50585a932080b57cca0484b259e61cecbaa33a4c98a300a")
(def ^:const two-mins (* 2 60))
(def ^:const one-day (* 60 60 24)) (def ^:const one-day (* 60 60 24))
(def ^:const three-days (* one-day 3)) (def ^:const three-days (* one-day 3))
(def ^:const one-week (* one-day 7)) (def ^:const one-week (* one-day 7))

View File

@ -3,10 +3,12 @@
(:require [status-im.ui.components.react :as react] (:require [status-im.ui.components.react :as react]
[status-im.i18n.i18n :as i18n] [status-im.i18n.i18n :as i18n]
[status-im.constants :as constants] [status-im.constants :as constants]
[status-im.utils.config :as config]
[quo.core :as quo] [quo.core :as quo]
[re-frame.core :as re-frame])) [re-frame.core :as re-frame]))
(def titles {constants/one-day (i18n/label :t/one-day) (def titles {constants/two-mins (i18n/label :t/two-minutes)
constants/one-day (i18n/label :t/one-day)
constants/three-days (i18n/label :t/three-days) constants/three-days (i18n/label :t/three-days)
constants/one-week (i18n/label :t/one-week) constants/one-week (i18n/label :t/one-week)
constants/one-month (i18n/label :t/one-month)}) constants/one-month (i18n/label :t/one-month)})
@ -21,6 +23,8 @@
(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]} [:multiaccount]]
[react/view {:margin-top 8} [react/view {:margin-top 8}
(when config/two-minutes-syncing?
[radio-item constants/two-mins default-sync-period])
[radio-item constants/one-day default-sync-period] [radio-item constants/one-day default-sync-period]
[radio-item constants/three-days default-sync-period] [radio-item constants/three-days default-sync-period]
[radio-item constants/one-week default-sync-period] [radio-item constants/one-week default-sync-period]

View File

@ -40,6 +40,8 @@
:chevron true :chevron true
:accessory :text :accessory :text
:accessory-text (cond :accessory-text (cond
(= default-sync-period constants/two-mins)
(i18n/label :t/two-minutes)
(= default-sync-period constants/one-day) (= 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)

View File

@ -52,6 +52,7 @@
(def delete-message-enabled? (enabled? (get-config :DELETE_MESSAGE_ENABLED "0"))) (def delete-message-enabled? (enabled? (get-config :DELETE_MESSAGE_ENABLED "0")))
(def collectibles-enabled? (enabled? (get-config :COLLECTIBLES_ENABLED "1"))) (def collectibles-enabled? (enabled? (get-config :COLLECTIBLES_ENABLED "1")))
(def test-stateofus? (enabled? (get-config :TEST_STATEOFUS "0"))) (def test-stateofus? (enabled? (get-config :TEST_STATEOFUS "0")))
(def two-minutes-syncing? (enabled? (get-config :TWO_MINUTES_SYNCING "0")))
;; CONFIG VALUES ;; CONFIG VALUES
(def log-level (def log-level

View File

@ -1703,5 +1703,6 @@
"status-dnd-subtitle": "Mutes all notifications", "status-dnd-subtitle": "Mutes all notifications",
"status-always-online": "Always Online", "status-always-online": "Always Online",
"status-inactive": "Inactive", "status-inactive": "Inactive",
"status-inactive-subtitle": "Hides your online status" "status-inactive-subtitle": "Hides your online status",
"two-minutes": "two minutes"
} }