parent
15e4c3df17
commit
3ae1b01fc6
|
|
@ -341,7 +341,7 @@ class GroupMemberListView: UIView {
|
||||||
return DateItem(date: item.date, day: item.day,
|
return DateItem(date: item.date, day: item.day,
|
||||||
isToday: item.isToday,
|
isToday: item.isToday,
|
||||||
isFuture: item.isFuture,
|
isFuture: item.isFuture,
|
||||||
isSelectable: hasAccess && !item.isFuture,
|
isSelectable: hasAccess && !item.isFuture && inFreeRange,
|
||||||
isLocked: hasAccess && !item.isFuture && !inFreeRange)
|
isLocked: hasAccess && !item.isFuture && !inFreeRange)
|
||||||
}
|
}
|
||||||
dateCollectionView.reloadData()
|
dateCollectionView.reloadData()
|
||||||
|
|
@ -371,7 +371,7 @@ class GroupMemberListView: UIView {
|
||||||
return DateItem(date: date, day: day,
|
return DateItem(date: date, day: day,
|
||||||
isToday: calendar.isDateInToday(date),
|
isToday: calendar.isDateInToday(date),
|
||||||
isFuture: isFuture,
|
isFuture: isFuture,
|
||||||
isSelectable: hasAccess && !isFuture,
|
isSelectable: hasAccess && !isFuture && inFreeRange,
|
||||||
isLocked: hasAccess && !isFuture && !inFreeRange)
|
isLocked: hasAccess && !isFuture && !inFreeRange)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -623,14 +623,7 @@ extension GroupMemberListView: UICollectionViewDataSource, UICollectionViewDeleg
|
||||||
let item = dateItems[indexPath.row]
|
let item = dateItems[indexPath.row]
|
||||||
guard item.isSelectable else { return }
|
guard item.isSelectable else { return }
|
||||||
|
|
||||||
if item.isLocked {
|
unlockVipMaskView.isHidden = true
|
||||||
tipsImg.image = selectedMemberIsSelf
|
|
||||||
? UIImage(named: "GroupMemberList/mask_self_tips")
|
|
||||||
: UIImage(named: "GroupMemberList/mask_member_tips")
|
|
||||||
unlockVipMaskView.isHidden = false
|
|
||||||
} else {
|
|
||||||
unlockVipMaskView.isHidden = true
|
|
||||||
}
|
|
||||||
|
|
||||||
let oldDate = selectedDate.value
|
let oldDate = selectedDate.value
|
||||||
selectedDate.accept(item.date)
|
selectedDate.accept(item.date)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class ItineraryTraceVC: BaseViewController {
|
||||||
private let memberModel: GroupMemberModel
|
private let memberModel: GroupMemberModel
|
||||||
private var routeOverlays: [MAPolyline] = []
|
private var routeOverlays: [MAPolyline] = []
|
||||||
private let routeSearch = AMapSearchAPI()
|
private let routeSearch = AMapSearchAPI()
|
||||||
private var playbackSegments: [[CLLocationCoordinate2D]?] = []
|
private var playbackSegments: [[CLLocationCoordinate2D]?] = []
|
||||||
private var playbackPath: [(coordinate: CLLocationCoordinate2D, distance: Double)] = []
|
private var playbackPath: [(coordinate: CLLocationCoordinate2D, distance: Double)] = []
|
||||||
private var playbackTotalDistance: Double = 0
|
private var playbackTotalDistance: Double = 0
|
||||||
private var playbackAnnotation: TracePlaybackAnnotation?
|
private var playbackAnnotation: TracePlaybackAnnotation?
|
||||||
|
|
@ -153,6 +153,10 @@ class ItineraryTraceVC: BaseViewController {
|
||||||
sampled.append(pt)
|
sampled.append(pt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// ponytail: last point may be skipped by 5s filter, always include it
|
||||||
|
if let lastPoint = points.last, sampled.last?.timestamp != lastPoint.timestamp {
|
||||||
|
sampled.append(lastPoint)
|
||||||
|
}
|
||||||
|
|
||||||
let coords = sampled.map { $0.coordinate }
|
let coords = sampled.map { $0.coordinate }
|
||||||
addPolyline(coords)
|
addPolyline(coords)
|
||||||
|
|
@ -211,12 +215,13 @@ class ItineraryTraceVC: BaseViewController {
|
||||||
abs(point.lng) > 0.0001,
|
abs(point.lng) > 0.0001,
|
||||||
CLLocationCoordinate2DIsValid(coordinate) else { continue }
|
CLLocationCoordinate2DIsValid(coordinate) else { continue }
|
||||||
|
|
||||||
if let last = result.last,
|
// ponytail: distance filter kills sparse GPS paths, time sampling is enough
|
||||||
last.coordinate.distance(to: coordinate) < minPointDistance {
|
// if let last = result.last,
|
||||||
continue
|
// last.coordinate.distance(to: coordinate) < minPointDistance {
|
||||||
}
|
// continue
|
||||||
|
// }
|
||||||
|
|
||||||
result.append((timestamp: point.timestamp, coordinate: coordinate))
|
result.append((timestamp: point.timestamp, coordinate: coordinate))
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ final class InteractionEmojiCell: UICollectionViewCell {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
let lockView: UIImageView = {
|
let lockView: UIImageView = {
|
||||||
let iv = UIImageView(image: UIImage(named: "Common/lock"))
|
let iv = UIImageView(image: UIImage(named: "Home/emoji_lock"))
|
||||||
iv.isHidden = true
|
iv.isHidden = true
|
||||||
return iv
|
return iv
|
||||||
}()
|
}()
|
||||||
|
|
@ -64,12 +64,10 @@ final class InteractionEmojiCell: UICollectionViewCell {
|
||||||
func configure(name: String) {
|
func configure(name: String) {
|
||||||
let isNormal = name.hasPrefix("normal_")
|
let isNormal = name.hasPrefix("normal_")
|
||||||
let map = isNormal ? Self.normalPngMap : Self.funPngMap
|
let map = isNormal ? Self.normalPngMap : Self.funPngMap
|
||||||
let base = isNormal ? "normal" : "fun"
|
|
||||||
if let pngName = map[name],
|
if let pngName = map[name],
|
||||||
// let path = Bundle.main.path(forResource: "lotties/emoji/\(base)/png/\(pngName)", ofType: "png") {
|
|
||||||
let path = Bundle.main.path(forResource: "\(pngName)", ofType: "png") {
|
let path = Bundle.main.path(forResource: "\(pngName)", ofType: "png") {
|
||||||
imageView.image = UIImage(contentsOfFile: path)
|
imageView.image = UIImage(contentsOfFile: path)
|
||||||
}
|
}
|
||||||
lockView.isHidden = AppContextManager.shared.vip > 1
|
lockView.isHidden = name.hasPrefix("normal_") || AppContextManager.shared.vip > 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ class InteractionView: UIView {
|
||||||
emojiCollectionView.rx.modelSelected(String.self)
|
emojiCollectionView.rx.modelSelected(String.self)
|
||||||
.subscribe(onNext: { [weak self] name in
|
.subscribe(onNext: { [weak self] name in
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
if name.hasPrefix("fun_"), AppContextManager.shared.vip <= 1 { return }
|
||||||
// 解析 index: normal_5 → 15, fun_2 → 22
|
// 解析 index: normal_5 → 15, fun_2 → 22
|
||||||
let prefix: String
|
let prefix: String
|
||||||
let numStr: String
|
let numStr: String
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue