| @@ -58,6 +58,7 @@ const DEFAULT_ROOM_SORT: [SortColumn<SortFieldRoom>; 5] = [ |
| 58 | 58 | |
| 59 | 59 | const DEFAULT_ENABLE_TITLE: bool = true; |
| 60 | 60 | const DEFAULT_REQ_TIMEOUT: u64 = 120; |
| 61 | const DEFAULT_SYNC_FREQUENCY: u64 = 250; |
| 61 | 62 | |
| 62 | 63 | const DEFAULT_ENC_INDICATOR_LOC: EncryptionIndicatorLocation = EncryptionIndicatorLocation::PROMPT; |
| 63 | 64 | const DEFAULT_ICON_ENC: Cow<'static, str> = Cow::Borrowed("[E] "); |
| @@ -849,6 +850,7 @@ pub struct TunableValues { |
| 849 | 850 | pub request_timeout: u64, |
| 850 | 851 | pub sort: SortValues, |
| 851 | 852 | pub state_event_display: bool, |
| 853 | pub sync_delay_ms: u64, |
| 852 | 854 | pub typing_notice_send: bool, |
| 853 | 855 | pub typing_notice_display: bool, |
| 854 | 856 | pub users: UserOverrides, |
| @@ -905,6 +907,7 @@ pub struct Tunables { |
| 905 | 907 | pub read_receipt_display: Option<bool>, |
| 906 | 908 | pub request_timeout: Option<u64>, |
| 907 | 909 | pub state_event_display: Option<bool>, |
| 910 | pub sync_delay_ms: Option<u64>, |
| 908 | 911 | pub typing_notice_send: Option<bool>, |
| 909 | 912 | pub typing_notice_display: Option<bool>, |
| 910 | 913 | pub username_display: Option<UserDisplayStyle>, |
| @@ -957,6 +960,7 @@ impl Tunables { |
| 957 | 960 | read_receipt_display: self.read_receipt_display.or(other.read_receipt_display), |
| 958 | 961 | request_timeout: self.request_timeout.or(other.request_timeout), |
| 959 | 962 | state_event_display: self.state_event_display.or(other.state_event_display), |
| 963 | sync_delay_ms: self.sync_delay_ms.or(other.sync_delay_ms), |
| 960 | 964 | typing_notice_send: self.typing_notice_send.or(other.typing_notice_send), |
| 961 | 965 | typing_notice_display: self.typing_notice_display.or(other.typing_notice_display), |
| 962 | 966 | username_display: self.username_display.or(other.username_display), |
| @@ -1002,6 +1006,7 @@ impl Tunables { |
| 1002 | 1006 | read_receipt_display: self.read_receipt_display.unwrap_or(true), |
| 1003 | 1007 | request_timeout: self.request_timeout.unwrap_or(DEFAULT_REQ_TIMEOUT), |
| 1004 | 1008 | state_event_display: self.state_event_display.unwrap_or(true), |
| 1009 | sync_delay_ms: self.sync_delay_ms.unwrap_or(DEFAULT_SYNC_FREQUENCY), |
| 1005 | 1010 | typing_notice_send: self.typing_notice_send.unwrap_or(true), |
| 1006 | 1011 | typing_notice_display: self.typing_notice_display.unwrap_or(true), |
| 1007 | 1012 | username_display: self.username_display.unwrap_or_default(), |