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