Commit Graph

94 Commits (65b1bb9bfdb9b78974277e911f1e0659773ebce0)

Author SHA1 Message Date
Michael Telatynski a7f92f35f5 Sync recently used reactions list across sessions
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-16 04:15:32 +01:00
Travis Ralston 7963ed6d04 Mute "Unknown room caused setting update" spam
See comment enclosed within.

Fixes https://github.com/vector-im/riot-web/issues/14254
2020-07-07 13:42:15 -06:00
Travis Ralston 1fe3e33dbf Factor out cloning to a util and use it everywhere 2020-06-22 14:14:43 -06:00
Travis Ralston 9e3c101172 Clone reads of account data to prevent mutation 2020-06-22 11:24:04 -06:00
Travis Ralston fe65b7631d Soften warning about lack of rooms in setting updates 2020-06-22 10:57:08 -06:00
Travis Ralston 099661c2aa Only fire setting changes for changed settings
Previously we were firing updates for everything, which is bad. This has an effect of causing the room list to update itself every time the user goes to toggle some account settings.
2020-06-22 10:18:38 -06:00
Michael Telatynski 1628fc668c Fix LocalEchoWrapper cache on falsey room ids
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-06-17 01:05:19 +01:00
Travis Ralston a05dafc300 Check for null config settings a bit safer
Fixes https://github.com/vector-im/riot-web/issues/12254
2020-02-12 01:58:21 +00:00
Travis Ralston 042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston 5253f29928 Build out a store for the right panel state machine
This should make it easier to funnel the expected behaviour through a central block of code.
2019-12-05 15:31:01 -07:00
Michael Telatynski 6121420113
Merge branch 'develop' into t3chguy/remove_bluebird 2019-11-20 15:21:23 +00:00
Travis Ralston 2f89f28496 Remove extraneous paranoia
The value is nullchecked later on.
2019-11-18 14:25:04 -07:00
Travis Ralston 8d25952dbb Add a bit more safety around breadcrumbs
Fixes https://github.com/vector-im/riot-web/issues/11420
2019-11-18 14:17:31 -07:00
Michael Telatynski d4d51dc61f Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Travis Ralston 9d0d1d3b36 Our code should probably compile... 2019-10-29 14:38:39 -06:00
Travis Ralston 5af6d979c2 Support a setting for allowed widgets
Hooking this setting up is left as a problem for a different issue.
2019-10-29 14:35:35 -06:00
Travis Ralston 28e0988325 Fix naming of integrationProvisioning 2019-10-29 14:26:35 -06:00
Travis Ralston 3b771f682d let -> const 2019-10-29 14:23:59 -06:00
Travis Ralston dd8f26a3f6 Add integration manager provisioning setting
To be used later by a future implementation
2019-10-29 14:20:53 -06:00
Travis Ralston 8dec435e50 Bring breadcrumbs into new Riot config standard 2019-10-29 14:12:05 -06:00
J. Ryan Stinnett 202f6fb94d Continue to next config level after device for features
This ensures we continue checking further config levels for the feature setting
if nothing is found when reading the device level. For example, this means the
feature setting's default value can be used.
2019-07-17 14:50:35 +01:00
Travis Ralston e2edae3383 Merge branch 'develop' into travis/breadcrumbs/telemetry 2019-04-05 09:35:38 -06:00
Travis Ralston 44198ea97d Sync breadcrumb rooms through account data
Fixes https://github.com/vector-im/riot-web/issues/9315

Other clients would need to listen for and update im.vector.riot.breadcrumb_rooms in account data.
2019-04-04 15:06:03 -06:00
Travis Ralston 842e19280d Apply changes to breadcrumbs setting live 2019-04-01 11:49:58 -06:00
Travis Ralston 93673eff12 Use a global WatchManager for settings
Fixes https://github.com/vector-im/riot-web/issues/8936

Watchers are now managed by the SettingsStore itself through a global/default watch manager. As per the included documentation, the watch manager dispatches updates to callbacks which are redirected by the SettingsStore for consumer safety.
2019-02-26 12:52:59 -07:00
Travis Ralston 3d152da822 Support custom tags in the new algorithm 2019-02-25 13:39:08 -07:00
Travis Ralston 7ea4008daa Implement support for watching for changes in settings
This implements a dream of one day being able to listen for changes in a settings to react to them, regardless of which device actually changed the setting. The use case for this kind of thing is extremely limited, but when it is needed it should be more than powerful enough.
2019-02-22 17:09:07 -07:00
J. Ryan Stinnett 215995de88 Resume reading default theme from config 2019-02-13 10:44:01 +00:00
Travis Ralston cb6f415a05 Be more positive with setting labels
Fixes https://github.com/vector-im/riot-web/issues/6435

This is done through an on-the-fly inverter for the settings. All the settings changed are boolean values, so this should be more than safe to just let happen throughout the SettingsStore. Typically a change like this would be done in the individual handlers (similar to how setting names are remapped to different properties or even different storage locations on the fly), however doing that for this many settings would be a huge nightmare and involve changing *all* the layers. By putting a global "invert this" flag on the setting, we can get away with doing the inversion as the last possible step during a read (or write).

To speed up calculations of the default values, we cache all the inverted values into a lookup table similar to how we represent the defaults already. Without this, the DefaultHandler would need to iterate the setting list and invert the values, slowing things down over time. We invert the value up front so we can keep the generic inversion logic without checking the level ahead of time. It is fully intended that a default value represents the new setting name, not the legacy name.

This commit also includes a debugger for settings because it was hard to visualize what the SettingsStore was doing during development. Some added information is included as it may be helpful for when someone has a problem with their settings and we need to debug it. Typically the debugger would be run in conjunction with `mxSendRageshake`: `mxSettingsStore.debugSetting('showJoinLeaves') && mxSendRageshake('Debugging showJoinLeaves setting')`.
2019-01-24 20:57:40 -07:00
Bruno Windels 7d0b8083b6 hardcode to to dharma to avoid weird mix 2018-10-22 16:33:46 +02:00
Michael Telatynski d1600bdacf
fix event type which room-account settings were read from
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-22 19:17:31 +01:00
Luke Barnard 0306c365cc Fix to prevent guests from seeing features 2018-04-06 11:03:17 +01:00
Michael Telatynski b7204e79a7 fallback after receiving settings rather than {} because its truthy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-01-17 18:17:26 +00:00
Michael Telatynski 43bb8c561d add comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-01-17 18:10:19 +00:00
Michael Telatynski b90a98b5c1 don't pass back {} when we have no `org.matrix.room.color_scheme`
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-01-17 18:06:19 +00:00
Travis Ralston 5976fb2eed Treat null/undefined notification settings as "not set"
Otherwise we end up lying and saying notifications are disabled, despite the push rules saying otherwise.

Part 1 of the fix for:
* https://github.com/vector-im/riot-web/issues/5603
* https://github.com/vector-im/riot-web/issues/5606

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-15 22:08:13 -07:00
Travis Ralston cf8ff6aed3 Validate that URL previews are explicitly enabled/disabled
Otherwise `!null` ends up being "true", therefore forcing URL previews on for everyone.

Fixes https://github.com/vector-im/riot-web/issues/5607

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-15 19:22:30 -07:00
Matthew Hodgson 96a3eff5d3 lint hell 2017-11-15 11:25:56 +00:00
Matthew Hodgson 84591729a8 unbreak tests 2017-11-15 11:15:49 +00:00
Travis Ralston 63bebe9dfd Split out avatar and display name hiding
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-13 12:58:10 -07:00
Travis Ralston c7d8f3931f Revert notification toolbar setting
It isn't a setting.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-08 17:06:36 -07:00
Travis Ralston 781b94c8f4 Appease the linter
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-05 15:37:06 -07:00
Travis Ralston 10519f9465 Fix the tests
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-05 14:56:41 -07:00
Travis Ralston 7ce4316cc8 Initial support for notification settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 21:47:18 -07:00