mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-04 08:27:30 +01:00
Suggest login on launch
This commit is contained in:
parent
a5308730f8
commit
150cb5a8c5
@ -52,8 +52,10 @@ struct AddAccountView: View {
|
|||||||
.background(theme.secondaryBackgroundColor)
|
.background(theme.secondaryBackgroundColor)
|
||||||
.scrollDismissesKeyboard(.immediately)
|
.scrollDismissesKeyboard(.immediately)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .navigationBarLeading) {
|
if !appAccountsManager.availableAccounts.isEmpty {
|
||||||
Button("Cancel", action: { dismiss() })
|
ToolbarItem(placement: .navigationBarLeading) {
|
||||||
|
Button("Cancel", action: { dismiss() })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
@ -37,6 +37,9 @@ struct TimelineTab: View {
|
|||||||
Task {
|
Task {
|
||||||
await currentAccount.fetchLists()
|
await currentAccount.fetchLists()
|
||||||
}
|
}
|
||||||
|
if !client.isAuth {
|
||||||
|
routeurPath.presentedSheet = .addAccount
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.onChange(of: client.isAuth, perform: { isAuth in
|
.onChange(of: client.isAuth, perform: { isAuth in
|
||||||
timeline = isAuth ? .home : .federated
|
timeline = isAuth ? .home : .federated
|
||||||
|
@ -26,11 +26,27 @@ public struct ExploreView: View {
|
|||||||
}
|
}
|
||||||
} else if !viewModel.isLoaded {
|
} else if !viewModel.isLoaded {
|
||||||
loadingView
|
loadingView
|
||||||
|
} else if viewModel.trendingLinks.isEmpty &&
|
||||||
|
viewModel.trendingTags.isEmpty &&
|
||||||
|
viewModel.trendingStatuses.isEmpty &&
|
||||||
|
viewModel.suggestedAccounts.isEmpty {
|
||||||
|
EmptyView(iconName: "magnifyingglass",
|
||||||
|
title: "Search your instance",
|
||||||
|
message: "From this screen you can search anything on \(client.server)")
|
||||||
|
.listRowBackground(theme.secondaryBackgroundColor)
|
||||||
} else {
|
} else {
|
||||||
trendingTagsSection
|
if !viewModel.trendingTags.isEmpty {
|
||||||
suggestedAccountsSection
|
trendingTagsSection
|
||||||
trendingPostsSection
|
}
|
||||||
trendingLinksSection
|
if !viewModel.suggestedAccounts.isEmpty {
|
||||||
|
suggestedAccountsSection
|
||||||
|
}
|
||||||
|
if !viewModel.trendingStatuses.isEmpty {
|
||||||
|
trendingPostsSection
|
||||||
|
}
|
||||||
|
if !viewModel.trendingLinks.isEmpty {
|
||||||
|
trendingLinksSection
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.task {
|
.task {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user