mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fixes #2320 - Implement support for (un)marking rooms as favourite from the room list and room detail screens
This commit is contained in:
@@ -63,6 +63,22 @@ struct HomeScreenRoomList: View {
|
||||
}
|
||||
}
|
||||
|
||||
if context.viewState.markAsFavouriteEnabled {
|
||||
if room.isFavourite {
|
||||
Button {
|
||||
context.send(viewAction: .markRoomAsFavourite(roomIdentifier: room.id, isFavourite: false))
|
||||
} label: {
|
||||
Label(L10n.commonFavourited, icon: \.favouriteSolid)
|
||||
}
|
||||
} else {
|
||||
Button {
|
||||
context.send(viewAction: .markRoomAsFavourite(roomIdentifier: room.id, isFavourite: true))
|
||||
} label: {
|
||||
Label(L10n.commonFavourite, icon: \.favourite)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
context.send(viewAction: .showRoomDetails(roomIdentifier: room.id))
|
||||
} label: {
|
||||
|
||||
Reference in New Issue
Block a user