Commit graph

44 commits

Author SHA1 Message Date
Matthew Hodgson
3e13a919ed
remove rogue debug 2017-11-16 13:09:53 +00:00
Travis Ralston
fb1f20b7d4 Treat the master push rule as authoritative
Previously the push rule was ignored, leading to all kinds of interesting issues regarding notifications. This fixes those issues by giving the master push rule the authority it deserves for reasonable defaults.

Part 2 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:33:23 -07: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
f141ee1944 Use the correct level order when getting arbitrary settings
This shouldn't currently be causing problems, but will in teh future. The bug can be exposed by having a setting where the level order is completely reversed, therefore causing LEVEL_ORDER[0] to actually be the most generic, not the most specific. Instead, we'll pull in the setting's level order and fallback to LEVEL_ORDER, therefore requesting the most specific value.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-15 19:24:32 -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
Travis Ralston
022e40a127 Use SettingsStore for default theme
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-15 19:04:49 -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
443bff5832 Presence feature
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-14 19:14:56 -07: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
ffecb82bca Groups were released
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-13 12:34:30 -07:00
Travis Ralston
f7da5836e1 Make blacklistUnverifiedDevices override the level order
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-08 17:41:32 -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
f0000f7400 Update documentation
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-05 14:33:40 -07:00
Travis Ralston
e31c89d360 Make the controller work for notifications
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 22:28:35 -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
Travis Ralston
8351ec7e73 Local echo on all setting levels
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 20:32:00 -07:00
Travis Ralston
b75be41f94 Fix split-brain for blacklistUnverifiedDevices
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 19:52:06 -07:00
Travis Ralston
cb17c0a379 Migrate blacklistUnverifiedDevicesPerRoom
This currently causes a split-brain scenario for the application due to the priority of each level. Granular settings assumes a simple override, however the crypto setting wants per room to be overriden with the global setting, regardless of the room setting. Some additional comments are needed on the intended behaviour.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 19:15:55 -07:00
Travis Ralston
c7eee36990 Fix lanugage detection
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 16:38:26 -06:00
Travis Ralston
4f1ad974fc Delay URL preview saving until the save button is pressed
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 16:32:13 -06:00
Travis Ralston
358298e4ee Support room color in settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 16:10:25 -06:00
Travis Ralston
bb5f7bed85 Check the correct event type for the room
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 15:48:24 -06:00
Travis Ralston
a8169a682c Throw errors if the setting isn't known
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 15:46:15 -06:00
Travis Ralston
257e1aabb8 Improve documentation of settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-04 15:44:01 -06:00
Travis Ralston
8282534f87 Add SettingsLevel enum; Move settings to own file.
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-03 23:19:45 -06:00
Travis Ralston
6f8523081b Some documentation
Far from complete, and probably needs a bit of work, but it's a start.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-30 21:09:24 -06:00
Travis Ralston
3efb0fdeeb Support default theme at config level
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-30 19:53:36 -06:00
Travis Ralston
9c846e4dd9 Fix URL preview options
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-30 19:49:44 -06:00
Travis Ralston
72517f95bb Don't explode if the SdkConfig isn't available
This can happen prior to logging in, for some reason.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 22:53:59 -06:00
Travis Ralston
786bd87fec Support URL previews (with bugs)
Known issues at this point:
* The room-level setting accepts the current user's default, which is wrong
* The checkboxes on RoomSettings are not independent
* The checkboxes in RoomSettings need some layout fixes

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 21:48:29 -06:00
Travis Ralston
9fdc1be7bd Make getLevelAt() return more generic responses
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 20:44:00 -06:00
Travis Ralston
b5d5c81f32 Add a new component to back various settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 20:43:27 -06:00
Travis Ralston
52f227cb3b Drop the idea of "config" being automatically supported
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 17:08:39 -06:00
Travis Ralston
0d3f0eaf98 Convert local settings to granular settings
This breaks language selection.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 16:53:00 -06:00
Travis Ralston
b3d17a7b51 Support legacy settings on the device
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 16:08:45 -06:00
Travis Ralston
e8acb0e102 Use getValueAt()
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 16:02:51 -06:00
Travis Ralston
ae10a11ac4 Convert synced settings to granular settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 01:43:52 -06:00
Travis Ralston
bf815f4be9 Support labs features
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-28 20:21:50 -06:00
Travis Ralston
7dda5e9196 Appease the linter round 1
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-28 19:53:12 -06:00
Travis Ralston
23d159e21c Make reading settings synchronous
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-28 19:45:48 -06:00
Travis Ralston
989bdcf5fb Rebuild SettingsStore to be better supported
This does away with the room- and account-style settings, and just replaces them with `supportedLevels`. The handlers have also been moved out to be in better support of the other options, like SdkConfig and per-room-per-device.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-28 19:13:06 -06:00