mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Render location events in the timeline (#1136)
* Start location integration in the timeline * Add warning * Add LocationRoomTimelineView * Add GeoURI * Refine LocationRoomTimelineView * Refine LocationRoomTimelineView * Add LocationRoomTimelineView previews * Cleanup code * Mock reply * Add FF for location events * Update project file * Fix MapLibreStaticMapView placeholder * Add MapTilerAttribution * Add LocationPinView * Fix layout * Start reply rendering * Refactor ReplyView.Icon * Add localisations * Fix reactions * Amend GeoURI regex * Add log * Fix tests * Attribution placement refactor * Cleanup * Replace NSRegularExpression with a regex * Cleanup * Update unit tests * isMediaType -> shouldFillBubble
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// Copyright 2023 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LocationPinView: View {
|
||||
var body: some View {
|
||||
Image(Asset.Images.locationPin.name)
|
||||
.alignmentGuide(VerticalAlignment.center) { dimensions in
|
||||
dimensions[.bottom]
|
||||
}
|
||||
.shadow(color: .black.opacity(0.2), radius: 8, x: 0, y: 5)
|
||||
}
|
||||
}
|
||||
|
||||
struct LocationPinView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VStack(spacing: 30) {
|
||||
LocationPinView()
|
||||
|
||||
LocationPinView()
|
||||
.colorScheme(.dark)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user