Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Implement a store for RoomView #921

Merged
merged 5 commits into from
May 25, 2017

Commits on May 24, 2017

  1. Implement a store for RoomView

    This allows for a truely flux-y way of storing the currently viewed room, making some callbacks (like onRoomIdResolved) redundant and making sure that the currently viewed room (ID) is only stored in one place as opposed to the previous many places.
    
    This was required for the `join_room` action which can be dispatched to join the currently viewed room.
    
    Another change was to introduce `LifeCycleStore` which is a start at encorporating state related to the lifecycle of the app into a flux store. Currently it only contains an action which will be dispatched when the sync state has become PREPARED. This was necessary to do a deferred dispatch of `join_room` following the registration of a PWLU (PassWord-Less User).
    
    The following actions are introduced:
     - RoomViewStore:
        - `view_room`: dispatch to change the currently viewed room ID
        - `join_room`: dispatch to join the currently viewed room
     - LifecycleStore:
        - `do_after_sync_prepared`: dispatch to store an action which will be dispatched when `sync_state` is dispatched with `state = 'PREPARED'`
     - MatrixChat:
        - `sync_state`: dispatched when the sync state changes. Ideally there'd be a SyncStateStore that emitted an `update` upon receiving this, but for now the `LifecycleStore` will listen for `sync_state` directly.
    Luke Barnard committed May 24, 2017
    Configuration menu
    Copy the full SHA
    298c5e4 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'new-guest-access' into luke/new-guest-access-room-view-…

    …store
    Luke Barnard committed May 24, 2017
    Configuration menu
    Copy the full SHA
    c96d93b View commit details
    Browse the repository at this point in the history
  3. Remove console log

    Luke Barnard committed May 24, 2017
    Configuration menu
    Copy the full SHA
    dcf2fb6 View commit details
    Browse the repository at this point in the history
  4. Add non-null RoomView key

    Luke Barnard committed May 24, 2017
    Configuration menu
    Copy the full SHA
    fffe425 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2017

  1. Add comment to explain sync_state dispatch

    Luke Barnard committed May 25, 2017
    Configuration menu
    Copy the full SHA
    8fc44a9 View commit details
    Browse the repository at this point in the history