forked from abner/for-legacy-web
feat: add Revolt discover (note: has CORS issues)
This commit is contained in:
@@ -27,7 +27,7 @@ export default class Layout implements Store, Persistent<Data> {
|
||||
* The last 'major section' that the user had open.
|
||||
* This is either the home tab or a channel ID (for a server channel).
|
||||
*/
|
||||
private lastSection: "home" | string;
|
||||
private lastSection: "home" | "discover" | string;
|
||||
|
||||
/**
|
||||
* The last path the user had open in the home tab.
|
||||
@@ -143,9 +143,19 @@ export default class Layout implements Store, Persistent<Data> {
|
||||
* @returns Last path
|
||||
*/
|
||||
@computed getLastPath() {
|
||||
return this.lastSection === "home"
|
||||
? this.lastHomePath
|
||||
: this.getLastOpened(this.lastSection);
|
||||
return this.lastSection === "discover"
|
||||
? "/discover"
|
||||
: this.lastSection === "home"
|
||||
? this.lastHomePath!
|
||||
: this.getLastOpened(this.lastSection)!;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the last opened section.
|
||||
* @param section Section name
|
||||
*/
|
||||
@action setLastSection(section: string) {
|
||||
this.lastSection = section;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user