Refactor and redesign Location Sharing Screen (#5155)

* refactored the static location screen to the location sharing screen

# Conflicts:
#	UnitTests/Sources/LocationSharingScreenViewModelTests.swift

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj

* implemented a custom pin with an overlayable view

* implemented the render of the user when the location is sender instead of the pin type

* removed description and body they are not used at all.

* reimplemented single button for sharing this or user location + implemented an experimental way to update annotations

* removed unnecessary @Suite description

* implemented a way to display the alert on top of the sheet and added a spinner to the center user location button

* fixed alerts strings

* fixed a failing test

* improved preview tests
This commit is contained in:
Mauro
2026-03-06 12:51:16 +01:00
committed by GitHub
parent 0c79b5404d
commit bbbb2e9dee
85 changed files with 917 additions and 626 deletions
@@ -0,0 +1,30 @@
//
// Copyright 2026 Element Creations Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
// Please see LICENSE files in the repository root for full details.
//
import SwiftUI
struct RowDivider: ViewModifier {
@Environment(\.pixelLength) var pixelLength: CGFloat
let alignment: Alignment
let horizontalInsets: CGFloat
func body(content: Content) -> some View {
content
.overlay(alignment: alignment) {
Rectangle()
.fill(Color.compound.borderDisabled)
.frame(height: pixelLength)
.padding(.trailing, -horizontalInsets)
}
}
}
extension View {
func rowDivider(alignment: Alignment = .bottom, horizontalInsets: CGFloat) -> some View {
modifier(RowDivider(alignment: alignment, horizontalInsets: horizontalInsets))
}
}