Commit graph

80 commits

Author SHA1 Message Date
Luke Barnard
175fadbb57 Add unregiseterListener to GroupStore 2017-10-27 15:08:38 +01:00
Luke Barnard
5d0aa8d7f7 Handle 403 when inspecting invited users as non-member 2017-10-27 11:38:10 +01:00
Luke Barnard
e094c32c62 Simplify GroupStore listener registration 2017-10-27 11:38:10 +01:00
Luke Barnard
7b666af24c When dispatching view_[my_]group[s], reset RoomViewStore
so that RoomTiles are not highlighted when the user is looking at MyGroups or GroupView
2017-10-24 16:32:52 +01:00
Luke Barnard
3ae31dd426 Make GroupStoreCache global for cross-package access 2017-10-24 10:39:47 +01:00
Luke Barnard
b9dc5cb5ed Merge branch 'develop' into luke/groups-update-on-invite 2017-10-23 16:05:52 +01:00
Luke Barnard
0799e5cde4 Refresh group member lists after inviting users 2017-10-23 16:04:26 +01:00
Luke Barnard
0ff5b9c6a7 Invalidate the user's public groups cache when changing group publicity
This will make the changes to their Flair "live", but only from the user's own perspective.
2017-10-23 15:28:38 +01:00
Luke Barnard
b0f8619754 Improve MyGroups UI
as per design layed out by @tur2live!
2017-10-19 17:24:45 +01:00
Luke Barnard
25d14af616 Export a global.singletonFlairStore to allow cross-project singleton 2017-10-19 12:00:03 +01:00
Luke Barnard
71443e9b94 Remove logs comments 2017-10-19 10:34:24 +01:00
Luke Barnard
5f3c06b38a Factor out Flair cache into FlairStore
This will make invalidating the userGroups cache for the user architecturally more sound (the plan is to have GroupStore hit FlairStore as opposed to Flair itself in order to invalidate the cache).
2017-10-19 10:28:59 +01:00
Luke Barnard
0415869b8c Add useful functions to GroupView to inspect user flags 2017-10-17 16:08:19 +01:00
Luke Barnard
917957c1dc Modify the group store to include group rooms
and modify components to use this new part of the store such that feedback can be given
when adding or removing a room from the room list.
2017-10-05 14:30:04 +01:00
Luke Barnard
cbb36b163b Typo 2017-10-04 18:05:40 +01:00
Luke Barnard
c1318e9102 Only maintain one GroupStore in the GroupStoreCache
So that the group store data is up-to-date and to prevent group stores hanging around in memory
2017-10-04 17:51:38 +01:00
Luke Barnard
b16eb1713e Typo 2017-10-04 17:01:44 +01:00
Luke Barnard
4017fa7f1d Factor-out GroupStore and create GroupStoreCache
In order to provide feedback when adding a room to a group, the group summarry store needs to be extended to store the list of rooms in a group. This commit is the first step required.

The next step is to get the GroupRoomList listening to updates from GroupStore and expose the list of rooms from GroupStore.

(We're running out of words to describe the hierachy of things that store things)
2017-10-04 16:56:35 +01:00
David Baker
8ec1c3ecf4 lint 2017-09-26 14:58:49 +01:00
David Baker
8d0983ab02 Fix group membership publicity
* Read the new flag in the summary API (the one we were reading
   was actually whether the group server listed you as a member to
   non-members).
 * Remove call to now-dead _loadGroupFromServer andf use the store
   instead
2017-09-26 14:46:57 +01:00
Luke Barnard
b8dca58f4f Pass matrixClient as an argument to GSS constructor 2017-09-25 10:02:13 +01:00
Luke Barnard
791bc5e7ac Create GroupSummaryStore for storing group summary stuff
- Acts as a layer between GroupView and the group APIs that modify the summary individually. This allows for abstraction of getting the new summary once a successful API hit has been done.
 - The plan is to also control the avatar, topic, body of the summary via the same class
2017-09-22 18:52:06 +01:00
David Baker
4d8eadad4f Clarify comment 2017-09-19 10:21:20 +01:00
David Baker
c265ec9571 Fix RoomView stuck in 'accept invite' state
After accepting a 3pid invite.

Rather than clear the joining flag when the join request completes,
leave it so the RoomView can see that we're expecting the user to
be joined in the various stages that might go through (waiting for
join request, waiting for room object, waiting for 'joined' member
event). The problem in this case was that we had to wait a bit for
the last one, and there was no bit of state to represent it.

This hopefully also makes the logic somewhat simpler.

Fixes https://github.com/vector-im/riot-web/issues/5041
2017-09-15 15:07:09 +01:00
David Baker
1b355e1a13 Merge pull request #1391 from matrix-org/dbkr/fix_slash_join
Make /join join again
2017-09-15 09:56:02 +01:00
David Baker
c814f02f34 Merge pull request #1390 from matrix-org/dbkr/create_room_no_spinner
Display spinner not room preview after room create
2017-09-15 09:18:55 +01:00
David Baker
f3a4856593 Merge remote-tracking branch 'origin/develop' into dbkr/fix_slash_join 2017-09-14 23:09:26 +01:00
David Baker
1f837d2ae1 Make /join join again
The auto_join parameter to view_room got broken at some point so
/join took you to the room and then sat there like a lemon.

Fixes https://github.com/vector-im/riot-web/issues/5029
2017-09-14 23:06:00 +01:00
David Baker
6b6e59e0dd Display spinner not room preview after room create
After creating a room, display the activity spinner while we wait
for the room to come down the event stream.

This was the intention before but I can't see how it would have
worked: we were setting the 'joining' flag, but then resetting it
by claiming we were already joined in the view_room dispatch.

 * Send 'joining' instead of 'joined' in view_room dispatch, which
   will set the corresponding joining flag (ie. to indicate we've
   sent a request to join the room). Remove the 'joined' flag.
 * Reset 'joining' to false otherwise on a view_room dispatch to
   prevent it from leaking between rooms (this may have been the
   intention of the `if (payload.joined) newState.joining = false`?

Fixes https://github.com/vector-im/riot-web/issues/4701
2017-09-14 22:22:21 +01:00
David Baker
ffb3d718d3 Fix the avatar / room name in room preview
When clicking on rooms from the room directory. When RoomViewStore
resolved the room alias, it threw away the out-of-band data in the
process. This must have been broken as part of the ILAG /
RoomViewStore stuff.
2017-09-13 15:48:53 +01:00
David Baker
d714291aa1 Re-add doc on scroll state map structure 2017-09-08 13:27:14 +01:00
David Baker
7f44ac7403 Remove now unused stuff from RoomViewStore 2017-09-07 17:15:19 +01:00
David Baker
408b8c18ea Introduce a RoomScrollStateStore
to keep the place we're scrolled to in rooms. This mainly eleimates
the extra, superfluous onRoomViewStoreUpdate callback that
happened when the previous room saved back its scroll state.
Moving the scroll state to a separate store means we can have this
not emit events because nothing needs to know when the scroll state
changes.
2017-09-07 17:08:36 +01:00
Michael Telatynski
24599ace32
don't track error messages
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-08-10 13:49:11 +01:00
Michael Telatynski
bf98c0da7c
un-i18n Modal Analytics
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-27 17:19:18 +01:00
Luke Barnard
a921059432 Fix vector-im/riot-web#4526 by pretending to join
I thought about adding separate dispatches to prevent confusion but if anyone adds anything that listens to existing dispatches, they really ought to be grep-ing the world for said dispatch actions.
2017-07-06 17:40:27 +01:00
Luke Barnard
6b6af3f148 Remove RTE content_state logging 2017-07-06 11:17:54 +01:00
Luke Barnard
df23a6cd85 Use Object.assign to set initial state of MessageComposerStore
Otherwise we just modify the initial state when running
2017-07-05 13:38:34 +01:00
Luke Barnard
3d5b3ed7ad Use ContentState instead and persist over localStorage 2017-07-05 11:49:34 +01:00
Luke Barnard
084a933dbd Implement MessageComposerStore to persist composer state across room switching
This behaviour was present in the old composer but implemented using local storage. This is unecessary as we don't really care about our drafts across clients, the important thing is that our draft is kept when switching rooms.

As a bonus, ifnore vertical arrow key presses when a modifier key is pressed so that the room switching keys (alt + up/down arrow) don't also cause history browsing (or autocomplete browsing).
2017-07-05 10:24:55 +01:00
Michael Telatynski
68fb11d2bf
de-lint LifecycleStore
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:35:40 +01:00
Matthew Hodgson
032650e095 Merge branch 'develop' into t3chguy/fix_forwarding 2017-06-19 01:53:35 +01:00
Luke Barnard
be58e1095e Don't peek when creating a room
This causes a race between receiving the room when starting to peek and receiving the room from joining it - https://github.com/vector-im/riot-web/issues/4330, https://github.com/matrix-org/riot-web-rageshakes/issues/196
2017-06-16 18:24:07 +01:00
Michael Telatynski
7b4cd31124 make forward_message be friendly with the RVS stuffs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-16 16:12:52 +01:00
Luke Barnard
f25c081007 When not specified, remove roomAlias state in RoomViewStore 2017-06-14 12:05:25 +01:00
Richard van der Hoff
091d8d3d36 Merge pull request #1062 from matrix-org/luke/fix-rvs-join-by-alias
When joining, use a roomAlias if we have it
2017-06-08 18:41:59 +01:00
Luke Barnard
cd6786114b When joining, use a roomAlias if we have it
And default to the current roomId otherwise
2017-06-08 17:40:53 +01:00
Luke Barnard
c72edab726 Update doc for getInitialEventId 2017-06-08 17:28:56 +01:00
Luke Barnard
cd8093d953 Explicit undefined initialEventPixelOffset 2017-06-08 17:28:21 +01:00
Luke Barnard
8cfdb4ce09 Clarify initial event 2017-06-08 17:27:04 +01:00