mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 00:25:35 +00:00
Default logout experience to trending timeline + remove cache when logout
This commit is contained in:
parent
a88b9a7fd9
commit
375ea665b4
2 changed files with 7 additions and 5 deletions
|
@ -61,7 +61,7 @@ struct TimelineTab: View {
|
||||||
if client.isAuth {
|
if client.isAuth {
|
||||||
timeline = lastTimelineFilter
|
timeline = lastTimelineFilter
|
||||||
} else {
|
} else {
|
||||||
timeline = .federated
|
timeline = .trending
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Task {
|
Task {
|
||||||
|
@ -125,8 +125,10 @@ struct TimelineTab: View {
|
||||||
private var timelineFilterButton: some View {
|
private var timelineFilterButton: some View {
|
||||||
headerGroup
|
headerGroup
|
||||||
timelineFiltersButtons
|
timelineFiltersButtons
|
||||||
listsFiltersButons
|
if client.isAuth {
|
||||||
tagsFiltersButtons
|
listsFiltersButons
|
||||||
|
tagsFiltersButtons
|
||||||
|
}
|
||||||
localTimelinesFiltersButtons
|
localTimelinesFiltersButtons
|
||||||
tagGroupsFiltersButtons
|
tagGroupsFiltersButtons
|
||||||
Divider()
|
Divider()
|
||||||
|
@ -325,7 +327,7 @@ struct TimelineTab: View {
|
||||||
if client.isAuth, canFilterTimeline {
|
if client.isAuth, canFilterTimeline {
|
||||||
timeline = lastTimelineFilter
|
timeline = lastTimelineFilter
|
||||||
} else if !client.isAuth {
|
} else if !client.isAuth {
|
||||||
timeline = .federated
|
timeline = .trending
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ import SwiftUI
|
||||||
private(set) var datasource = TimelineDatasource()
|
private(set) var datasource = TimelineDatasource()
|
||||||
private let cache = TimelineCache()
|
private let cache = TimelineCache()
|
||||||
private var isCacheEnabled: Bool {
|
private var isCacheEnabled: Bool {
|
||||||
canFilterTimeline && timeline.supportNewestPagination
|
canFilterTimeline && timeline.supportNewestPagination && client?.isAuth == true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ObservationIgnored
|
@ObservationIgnored
|
||||||
|
|
Loading…
Reference in a new issue