Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
13675b258d
2 changed files with 11 additions and 2 deletions
|
@ -44,7 +44,7 @@ import { KeyCode, isOnlyCtrlOrCmdKeyEvent } from '../../Keyboard';
|
||||||
|
|
||||||
import RoomViewStore from '../../stores/RoomViewStore';
|
import RoomViewStore from '../../stores/RoomViewStore';
|
||||||
import RoomScrollStateStore from '../../stores/RoomScrollStateStore';
|
import RoomScrollStateStore from '../../stores/RoomScrollStateStore';
|
||||||
import SettingsStore from "../../settings/SettingsStore";
|
import SettingsStore, {SettingLevel} from "../../settings/SettingsStore";
|
||||||
|
|
||||||
const DEBUG = false;
|
const DEBUG = false;
|
||||||
let debuglog = function() {};
|
let debuglog = function() {};
|
||||||
|
@ -115,6 +115,7 @@ module.exports = React.createClass({
|
||||||
showApps: false,
|
showApps: false,
|
||||||
isAlone: false,
|
isAlone: false,
|
||||||
isPeeking: false,
|
isPeeking: false,
|
||||||
|
showingPinned: false,
|
||||||
|
|
||||||
// error object, as from the matrix client/server API
|
// error object, as from the matrix client/server API
|
||||||
// If we failed to load information about the room,
|
// If we failed to load information about the room,
|
||||||
|
@ -182,6 +183,7 @@ module.exports = React.createClass({
|
||||||
isInitialEventHighlighted: RoomViewStore.isInitialEventHighlighted(),
|
isInitialEventHighlighted: RoomViewStore.isInitialEventHighlighted(),
|
||||||
forwardingEvent: RoomViewStore.getForwardingEvent(),
|
forwardingEvent: RoomViewStore.getForwardingEvent(),
|
||||||
shouldPeek: RoomViewStore.shouldPeek(),
|
shouldPeek: RoomViewStore.shouldPeek(),
|
||||||
|
showingPinned: SettingsStore.getValue("PinnedEvents.isOpen", RoomViewStore.getRoomId()),
|
||||||
editingRoomSettings: RoomViewStore.isEditingSettings(),
|
editingRoomSettings: RoomViewStore.isEditingSettings(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1136,7 +1138,10 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onPinnedClick: function() {
|
onPinnedClick: function() {
|
||||||
this.setState({showingPinned: !this.state.showingPinned, searching: false});
|
const nowShowingPinned = !this.state.showingPinned;
|
||||||
|
const roomId = this.state.room.roomId;
|
||||||
|
this.setState({showingPinned: nowShowingPinned, searching: false});
|
||||||
|
SettingsStore.setValue("PinnedEvents.isOpen", roomId, SettingLevel.ROOM_DEVICE, nowShowingPinned);
|
||||||
},
|
},
|
||||||
|
|
||||||
onSettingsClick: function() {
|
onSettingsClick: function() {
|
||||||
|
|
|
@ -274,4 +274,8 @@ export const SETTINGS = {
|
||||||
displayName: _td('Enable widget screenshots on supported widgets'),
|
displayName: _td('Enable widget screenshots on supported widgets'),
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
"PinnedEvents.isOpen": {
|
||||||
|
supportedLevels: ['room-device'],
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue