mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Another attempt to refresh mute state for channels
Clean up navigation stack styles
This commit is contained in:
parent
861d824183
commit
76b7127b68
3 changed files with 4 additions and 5 deletions
|
|
@ -29,7 +29,6 @@ struct ChannelMessageList: View {
|
|||
@State private var deleteMessageId: Int64 = 0
|
||||
@State private var replyMessageId: Int64 = 0
|
||||
@State private var sendPositionWithMessage: Bool = false
|
||||
//@State private var refreshId = UUID()
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
|
|
@ -218,13 +217,11 @@ struct ChannelMessageList: View {
|
|||
.scrollDismissesKeyboard(.immediately)
|
||||
.onAppear(perform: {
|
||||
self.bleManager.context = context
|
||||
// refreshId = UUID()
|
||||
if channel.allPrivateMessages.count > 0 {
|
||||
scrollView.scrollTo(channel.allPrivateMessages.last!.messageId)
|
||||
}
|
||||
})
|
||||
.onChange(of: channel.allPrivateMessages, perform: { messages in
|
||||
// refreshId = UUID()
|
||||
if channel.allPrivateMessages.count > 0 {
|
||||
scrollView.scrollTo(channel.allPrivateMessages.last!.messageId)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,10 @@ struct Contacts: View {
|
|||
|
||||
do {
|
||||
try context.save()
|
||||
self.context.refresh(channel, mergeChanges: true)
|
||||
// Would rather not do this but the merge changes on
|
||||
// A single object is only working on mac GVH
|
||||
context.refreshAllObjects()
|
||||
//context.refresh(channel, mergeChanges: true)
|
||||
} catch {
|
||||
context.rollback()
|
||||
print("💥 Save Channel Mute Error")
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ struct ExternalNotificationConfig: View {
|
|||
if newUsePWM != node!.externalNotificationConfig!.usePWM { hasChanges = true }
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue