mirror of
https://github.com/urbit/shrub.git
synced 2025-01-04 10:32:34 +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 = {
|
this.metadata = {
|
||||||
add: helper.metadataAdd.bind(helper)
|
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) {
|
if (this.store.state.sidebarShown === true) {
|
||||||
sidebarBoolean = false;
|
sidebarBoolean = false;
|
||||||
}
|
}
|
||||||
this.handleEvent({
|
this.store.handleEvent({
|
||||||
type: 'local',
|
|
||||||
data: {
|
data: {
|
||||||
'sidebarToggle': sidebarBoolean
|
local: {
|
||||||
|
sidebarToggle: sidebarBoolean
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import BaseStore from './base';
|
|||||||
|
|
||||||
import ContactReducer from '../reducers/contact-update';
|
import ContactReducer from '../reducers/contact-update';
|
||||||
import GroupReducer from '../reducers/group-update';
|
import GroupReducer from '../reducers/group-update';
|
||||||
|
import LocalReducer from '../reducers/local';
|
||||||
import PublishReducer from '../reducers/publish-update';
|
import PublishReducer from '../reducers/publish-update';
|
||||||
import InviteReducer from '../reducers/invite-update';
|
import InviteReducer from '../reducers/invite-update';
|
||||||
import PublishResponseReducer from '../reducers/publish-response';
|
import PublishResponseReducer from '../reducers/publish-response';
|
||||||
@ -14,6 +15,7 @@ export default class PublishStore extends BaseStore {
|
|||||||
|
|
||||||
this.contactReducer = new ContactReducer();
|
this.contactReducer = new ContactReducer();
|
||||||
this.groupReducer = new GroupReducer();
|
this.groupReducer = new GroupReducer();
|
||||||
|
this.localReducer = new LocalReducer();
|
||||||
this.publishReducer = new PublishReducer();
|
this.publishReducer = new PublishReducer();
|
||||||
this.inviteReducer = new InviteReducer();
|
this.inviteReducer = new InviteReducer();
|
||||||
this.responseReducer = new PublishResponseReducer();
|
this.responseReducer = new PublishResponseReducer();
|
||||||
@ -38,6 +40,7 @@ export default class PublishStore extends BaseStore {
|
|||||||
reduce(data, state) {
|
reduce(data, state) {
|
||||||
this.contactReducer.reduce(data, this.state);
|
this.contactReducer.reduce(data, this.state);
|
||||||
this.groupReducer.reduce(data, this.state);
|
this.groupReducer.reduce(data, this.state);
|
||||||
|
this.localReducer.reduce(data, this.state);
|
||||||
this.publishReducer.reduce(data, this.state);
|
this.publishReducer.reduce(data, this.state);
|
||||||
this.permissionReducer.reduce(data, this.state);
|
this.permissionReducer.reduce(data, this.state);
|
||||||
this.metadataReducer.reduce(data, this.state);
|
this.metadataReducer.reduce(data, this.state);
|
||||||
|
Loading…
Reference in New Issue
Block a user