Skip to content
This repository was archived by the owner on Jun 21, 2019. It is now read-only.
This repository was archived by the owner on Jun 21, 2019. It is now read-only.

Generalize InvitedRoom/JoinedRoom/LeftRoom (in _SyncData) #71

@yyportne

Description

@yyportne

_SyncData contains the types InvitedRoom, JoinedRoom and LeftRoom. Currently they don't have a generalized type. This leads to code duplication and in some cases triplication.

All three types contain synchronisation data for a specific room. Common properties are the room ID #getId() and the state events #getState().

A generalized type RoomData (or some other name) could be

interface RoomData {
   String getId(); // room ID
   State getState(); // state events
}

For better distinction between the RoomData subtypes add a RoomDataKind enum

enum RoomDataKind {
  JOINED,
  INVITED,
  LEFT
  ;
}
interface RoomData {
  …
  RoomDataKind getKind();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions