Add support for showing the user's own status over their avatar on the app's Settings button. (#5912)

* Add a common .inverseMask view modifier and use a blend mode for efficiency.

This also fixes the snapshot rendering 🎉

* Add support for the status emoji on the app's Setting button.

* Align the room header decoration icons with the status emoji.

* Add missing snapshots.
This commit is contained in:
Doug
2026-07-22 14:53:32 +01:00
committed by GitHub
parent e4f919e58f
commit b46189d05f
103 changed files with 376 additions and 268 deletions
@@ -23,21 +23,15 @@ struct BadgeViewModifier: ViewModifier {
let size: Double
func body(content: Content) -> some View {
content.mask {
Rectangle()
.fill(.white)
.overlay(alignment: .topTrailing) {
Circle()
.fill(.black)
.frame(width: maskSize, height: maskSize)
.offset(maskOffset)
}
.compositingGroup()
.luminanceToAlpha()
}
.overlay(alignment: .topTrailing) {
BadgeView(size: size)
}
content
.inverseMask(alignment: .topTrailing) {
Circle()
.frame(width: maskSize, height: maskSize)
.offset(maskOffset)
}
.overlay(alignment: .topTrailing) {
BadgeView(size: size)
}
}
private var maskSize: Double {