Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1988067

Browse files
author
Kerry Archibald
committed
add left panel share warning
Signed-off-by: Kerry Archibald <[email protected]>
1 parent 6458906 commit 1988067

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

res/css/_components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@import "./_font-sizes.scss";
55
@import "./_font-weights.scss";
66
@import "./_spacing.scss";
7+
@import "./components/views/beacon/_LeftPanelLiveShareWarning.scss";
78
@import "./components/views/location/_LocationShareMenu.scss";
89
@import "./components/views/location/_MapError.scss";
910
@import "./components/views/location/_ShareDialogButtons.scss";

src/components/structures/LeftPanel.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import ResizeNotifier from "../../utils/ResizeNotifier";
2929
import AccessibleTooltipButton from "../views/elements/AccessibleTooltipButton";
3030
import { replaceableComponent } from "../../utils/replaceableComponent";
3131
import SpaceStore from "../../stores/spaces/SpaceStore";
32-
import { OwnBeaconStore, OwnBeaconStoreEvent } from "../../stores/OwnBeaconStore";
3332
import { MetaSpace, SpaceKey, UPDATE_SELECTED_SPACE } from "../../stores/spaces";
3433
import { getKeyBindingsManager } from "../../KeyBindingsManager";
3534
import UIStore from "../../stores/UIStore";
@@ -60,7 +59,6 @@ enum BreadcrumbsMode {
6059
interface IState {
6160
showBreadcrumbs: BreadcrumbsMode;
6261
activeSpace: SpaceKey;
63-
hasLiveBeacons: boolean;
6462
}
6563

6664
@replaceableComponent("structures.LeftPanel")
@@ -77,14 +75,11 @@ export default class LeftPanel extends React.Component<IProps, IState> {
7775
this.state = {
7876
activeSpace: SpaceStore.instance.activeSpace,
7977
showBreadcrumbs: LeftPanel.breadcrumbsMode,
80-
hasLiveBeacons: OwnBeaconStore.instance.hasLiveBeacons(),
8178
};
8279

8380
BreadcrumbsStore.instance.on(UPDATE_EVENT, this.onBreadcrumbsUpdate);
8481
RoomListStore.instance.on(LISTS_UPDATE_EVENT, this.onBreadcrumbsUpdate);
8582
SpaceStore.instance.on(UPDATE_SELECTED_SPACE, this.updateActiveSpace);
86-
// TODO whats wrong with ownbeaconstore that it needs bind
87-
OwnBeaconStore.instance.on(OwnBeaconStoreEvent.LivenessChange, this.onBeaconLivenessChange.bind(this));
8883
}
8984

9085
private static get breadcrumbsMode(): BreadcrumbsMode {
@@ -106,7 +101,6 @@ export default class LeftPanel extends React.Component<IProps, IState> {
106101
SpaceStore.instance.off(UPDATE_SELECTED_SPACE, this.updateActiveSpace);
107102
UIStore.instance.stopTrackingElementDimensions("ListContainer");
108103
UIStore.instance.removeListener("ListContainer", this.refreshStickyHeaders);
109-
OwnBeaconStore.instance.removeListener(OwnBeaconStoreEvent.LivenessChange, this.onBeaconLivenessChange);
110104
this.listContainerRef.current?.removeEventListener("scroll", this.onScroll);
111105
}
112106

@@ -402,10 +396,6 @@ export default class LeftPanel extends React.Component<IProps, IState> {
402396
);
403397
}
404398

405-
private onBeaconLivenessChange(hasLiveBeacons: boolean): void {
406-
this.setState({ hasLiveBeacons });
407-
}
408-
409399
public render(): React.ReactNode {
410400
const roomList = <RoomList
411401
onKeyDown={this.onKeyDown}
@@ -431,7 +421,6 @@ export default class LeftPanel extends React.Component<IProps, IState> {
431421

432422
return (
433423
<div className={containerClasses}>
434-
{ this.state.hasLiveBeacons && <h3>has live beacons</h3> }
435424
<aside className="mx_LeftPanel_roomListContainer">
436425
{ this.renderSearchDialExplore() }
437426
{ this.renderBreadcrumbs() }

src/components/views/beacon/LeftPanelLiveShareWarning.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const LeftPanelLiveShareWarning: React.FC<Props> = ({ isMinimized }) => {
4343
})}
4444
title={isMinimized ? _t('You are sharing your live location') : undefined}
4545
>
46-
{ isMinimized ? <LiveLocationIcon height={10} /> : _t('You are sharing your live location') }
46+
{isMinimized ? <LiveLocationIcon height={10} /> : _t('You are sharing your live location')}
4747
</div>;
4848
};
4949

0 commit comments

Comments
 (0)