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

Commit

Permalink
Merge pull request #3162 from matrix-org/travis/cleanup-breadcrumbs
Browse files Browse the repository at this point in the history
Clean up legacy breadcrumbs persistence fallback
  • Loading branch information
turt2live authored Jul 1, 2019
2 parents a1b5c8a + 4f6db32 commit 64f0a7c
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/components/views/rooms/RoomBreadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,7 @@ export default class RoomBreadcrumbs extends React.Component {
componentWillMount() {
this._dispatcherRef = dis.register(this.onAction);

let storedRooms = SettingsStore.getValue("breadcrumb_rooms");
if (!storedRooms || !storedRooms.length) {
// Fallback to the rooms stored in localstorage for those who would have had this.
// TODO: Remove this after a bit - the feature was only on develop, so a few weeks should be plenty time.
const roomStr = localStorage.getItem("mx_breadcrumb_rooms");
if (roomStr) {
try {
storedRooms = JSON.parse(roomStr);
} catch (e) {
console.error("Failed to parse breadcrumbs:", e);
}
}
}
const storedRooms = SettingsStore.getValue("breadcrumb_rooms");
this._loadRoomIds(storedRooms || []);

this._settingWatchRef = SettingsStore.watchSetting("breadcrumb_rooms", null, this.onBreadcrumbsChanged);
Expand Down

0 comments on commit 64f0a7c

Please sign in to comment.