Fix undefined error
This commit is contained in:
parent
405140c8e0
commit
f5d63e647a
|
@ -56,9 +56,7 @@ export default class UserTimeline extends Vue {
|
||||||
public deleteListeners: [string, DeleteListener][] = []
|
public deleteListeners: [string, DeleteListener][] = []
|
||||||
public updateListeners: [string, UpdateListener][] = []
|
public updateListeners: [string, UpdateListener][] = []
|
||||||
public timelineType: string = "home"
|
public timelineType: string = "home"
|
||||||
public userTimelineTypes: {
|
public userTimelineTypes: { [key: string]: string } = {
|
||||||
[key: string]: string
|
|
||||||
} = {
|
|
||||||
home: "Home Timeline",
|
home: "Home Timeline",
|
||||||
notify: "Notifications",
|
notify: "Notifications",
|
||||||
dm: "Direct Messages",
|
dm: "Direct Messages",
|
||||||
|
@ -68,6 +66,11 @@ export default class UserTimeline extends Vue {
|
||||||
localPlus: "Integrated Timeline (Local + Boost + Reply)"
|
localPlus: "Integrated Timeline (Local + Boost + Reply)"
|
||||||
}
|
}
|
||||||
public TL: Timelines = []
|
public TL: Timelines = []
|
||||||
|
//test
|
||||||
|
public pref = {
|
||||||
|
static: false
|
||||||
|
}
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.updateListeners.forEach(([name, listener]) => {
|
this.updateListeners.forEach(([name, listener]) => {
|
||||||
ipcRenderer.removeListener(name, listener)
|
ipcRenderer.removeListener(name, listener)
|
||||||
|
@ -85,7 +88,7 @@ export default class UserTimeline extends Vue {
|
||||||
}
|
}
|
||||||
public addTL() {
|
public addTL() {
|
||||||
let timeline: Timeline = {
|
let timeline: Timeline = {
|
||||||
name: "",
|
name: this.username,
|
||||||
type: this.timelineType,
|
type: this.timelineType,
|
||||||
statuses: new Map()
|
statuses: new Map()
|
||||||
}
|
}
|
||||||
|
@ -101,7 +104,7 @@ export default class UserTimeline extends Vue {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
ipcRenderer.send("timeline", timeline.type, timeline.name)
|
ipcRenderer.send("timeline", timeline.name, timeline.type)
|
||||||
}
|
}
|
||||||
public loadTL(timeline: Timeline, statuses: Status[]) {
|
public loadTL(timeline: Timeline, statuses: Status[]) {
|
||||||
timeline.statuses = new Map(
|
timeline.statuses = new Map(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user