mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
TimelineKind refactor (#3193)
This commit is contained in:
+12
-11
@@ -54,19 +54,20 @@ struct PinnedItemsBannerView: View {
|
||||
|
||||
@ViewBuilder
|
||||
private var viewAllButton: some View {
|
||||
switch state {
|
||||
case .loaded:
|
||||
Button { onViewAllButtonTap() } label: {
|
||||
Text(L10n.screenRoomPinnedBannerViewAllButtonTitle)
|
||||
.font(.compound.bodyMDSemibold)
|
||||
.foregroundStyle(Color.compound.textPrimary)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 5)
|
||||
}
|
||||
case .loading:
|
||||
ProgressView()
|
||||
Button { onViewAllButtonTap() } label: {
|
||||
Text(state.isLoading ? "" : L10n.screenRoomPinnedBannerViewAllButtonTitle)
|
||||
.font(.compound.bodyMDSemibold)
|
||||
.foregroundStyle(Color.compound.textPrimary)
|
||||
.opacity(state.isLoading ? 0 : 1)
|
||||
// Use overlay instead otherwise the sliding animation would not work
|
||||
.overlay(alignment: .trailing) {
|
||||
ProgressView()
|
||||
.opacity(state.isLoading ? 1 : 0)
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 5)
|
||||
}
|
||||
.disabled(state.isLoading)
|
||||
}
|
||||
|
||||
private var content: some View {
|
||||
|
||||
Reference in New Issue
Block a user