mirror of
https://github.com/urbit/shrub.git
synced 2025-01-02 01:25:55 +03:00
chat, publish: restore sidebar toggler actions
This commit is contained in:
parent
1b28ea1345
commit
b425fb6723
@ -37,6 +37,7 @@ export default class ChatApi {
|
||||
this.metadata = {
|
||||
add: helper.metadataAdd.bind(helper)
|
||||
};
|
||||
this.sidebarToggle = helper.sidebarToggle.bind(helper);
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,5 +205,18 @@ class PrivateHelper extends BaseApi {
|
||||
});
|
||||
}
|
||||
|
||||
sidebarToggle() {
|
||||
let sidebarBoolean = true;
|
||||
if (this.store.state.sidebarShown === true) {
|
||||
sidebarBoolean = false;
|
||||
}
|
||||
this.store.handleEvent({
|
||||
data: {
|
||||
local: {
|
||||
sidebarToggle: sidebarBoolean
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,10 +91,11 @@ export default class PublishApi extends BaseApi {
|
||||
if (this.store.state.sidebarShown === true) {
|
||||
sidebarBoolean = false;
|
||||
}
|
||||
this.handleEvent({
|
||||
type: 'local',
|
||||
this.store.handleEvent({
|
||||
data: {
|
||||
'sidebarToggle': sidebarBoolean
|
||||
local: {
|
||||
sidebarToggle: sidebarBoolean
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import BaseStore from './base';
|
||||
|
||||
import ContactReducer from '../reducers/contact-update';
|
||||
import GroupReducer from '../reducers/group-update';
|
||||
import LocalReducer from '../reducers/local';
|
||||
import PublishReducer from '../reducers/publish-update';
|
||||
import InviteReducer from '../reducers/invite-update';
|
||||
import PublishResponseReducer from '../reducers/publish-response';
|
||||
@ -14,6 +15,7 @@ export default class PublishStore extends BaseStore {
|
||||
|
||||
this.contactReducer = new ContactReducer();
|
||||
this.groupReducer = new GroupReducer();
|
||||
this.localReducer = new LocalReducer();
|
||||
this.publishReducer = new PublishReducer();
|
||||
this.inviteReducer = new InviteReducer();
|
||||
this.responseReducer = new PublishResponseReducer();
|
||||
@ -38,6 +40,7 @@ export default class PublishStore extends BaseStore {
|
||||
reduce(data, state) {
|
||||
this.contactReducer.reduce(data, this.state);
|
||||
this.groupReducer.reduce(data, this.state);
|
||||
this.localReducer.reduce(data, this.state);
|
||||
this.publishReducer.reduce(data, this.state);
|
||||
this.permissionReducer.reduce(data, this.state);
|
||||
this.metadataReducer.reduce(data, this.state);
|
||||
|
Loading…
Reference in New Issue
Block a user