Show "Favorites" label below logo when viewing favorites timeline
Adds a visual indicator under the Damus logo when the favorites timeline is active. Uses fixed height with opacity to prevent layout bouncing when switching timelines.
This commit is contained in:
committed by
Daniel D’Aquino
parent
434c54f98e
commit
8c5027248b
@@ -95,15 +95,23 @@ struct PostingTimelineView: View {
|
|||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||||
.overlay {
|
.overlay {
|
||||||
Image("damus-home")
|
VStack(spacing: 2) {
|
||||||
.resizable()
|
Image("damus-home")
|
||||||
.frame(width:30,height:30)
|
.resizable()
|
||||||
.shadow(color: DamusColors.purple, radius: 2)
|
.frame(width: 30, height: 30)
|
||||||
.opacity(isSideBarOpened ? 0 : 1)
|
.shadow(color: DamusColors.purple, radius: 2)
|
||||||
.animation(isSideBarOpened ? .none : .default, value: isSideBarOpened)
|
if damus_state.settings.enable_favourites_feature {
|
||||||
.onTapGesture {
|
Text(timeline_source == .favorites ? timeline_source.description : " ")
|
||||||
isSideBarOpened.toggle()
|
.font(.caption2)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
.opacity(timeline_source == .favorites ? 1 : 0)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.opacity(isSideBarOpened ? 0 : 1)
|
||||||
|
.animation(isSideBarOpened ? .none : .default, value: isSideBarOpened)
|
||||||
|
.onTapGesture {
|
||||||
|
isSideBarOpened.toggle()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 20)
|
.padding(.horizontal, 20)
|
||||||
|
|||||||
Reference in New Issue
Block a user