added selectionPanelRoom var and set method and removed odd out setVisible and toggleVisible methods
This commit is contained in:
parent
6a5a2f7c22
commit
e283ced388
@ -4,22 +4,24 @@ class InfoPanelStore {
|
||||
isVisible = false;
|
||||
|
||||
selection = null;
|
||||
|
||||
currentRoomTitle = null;
|
||||
currentRoomMembers = null;
|
||||
selectionParentRoom = null;
|
||||
|
||||
roomsView = "members";
|
||||
personalView = "history";
|
||||
|
||||
settingsStore = null;
|
||||
setSettingsStore = (settingsStore) => (this.settingsStore = settingsStore);
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
setSelection = (selection) => {
|
||||
this.selection = selection;
|
||||
setSelection = (selection) => (this.selection = selection);
|
||||
setSelectionParentRoom = (obj) => (this.selectionParentRoom = obj);
|
||||
setIsVisible = (bool) => (this.isVisible = bool);
|
||||
setSettingsStore = (settingsStore) => (this.settingsStore = settingsStore);
|
||||
setView = (view) => {
|
||||
this.roomsView = view;
|
||||
this.personalView = view === "members" ? "history" : view;
|
||||
};
|
||||
|
||||
getItemIcon = (item, size) => {
|
||||
@ -40,31 +42,6 @@ class InfoPanelStore {
|
||||
thumbnailUrl: selection.thumbnailUrl || this.getItemIcon(selection, 96),
|
||||
};
|
||||
};
|
||||
|
||||
setCurrentRoomTitle = (currentRoomTitle) => {
|
||||
this.currentRoomTitle = currentRoomTitle;
|
||||
};
|
||||
|
||||
setCurrentRoomMembers = (currentRoomMembers) => {
|
||||
this.currentRoomMembers = currentRoomMembers;
|
||||
};
|
||||
|
||||
toggleIsVisible = () => {
|
||||
this.isVisible = !this.isVisible;
|
||||
};
|
||||
|
||||
setVisible = () => {
|
||||
this.isVisible = true;
|
||||
};
|
||||
|
||||
setIsVisible = (bool) => {
|
||||
this.isVisible = bool;
|
||||
};
|
||||
|
||||
setView = (view) => {
|
||||
this.roomsView = view;
|
||||
this.personalView = view === "members" ? "history" : view;
|
||||
};
|
||||
}
|
||||
|
||||
export default InfoPanelStore;
|
||||
|
Loading…
Reference in New Issue
Block a user