Skip to content

Commit

Permalink
Make deviceId a computed property
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrfennell authored and tmolitor-stud-tu committed Aug 15, 2024
1 parent b87b437 commit e609261
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Monal/Classes/OmemoKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,14 @@ struct OmemoKeysEntry: View {
}

struct OmemoKeysForContact: View {
@State private var deviceId: NSNumber
@State private var deviceIds: OrderedSet<NSNumber>
@State private var showDeleteKeyAlert = false
@State private var selectedDeviceForDeletion : NSNumber

private var deviceId: NSNumber {
return account.omemo.getDeviceId()
}

private let contactJid: String
private let account: xmpp
private let ownKeys: Bool
Expand All @@ -209,7 +212,6 @@ struct OmemoKeysForContact: View {
self.ownKeys = (account.connectionProperties.identity.jid == contact.obj.contactJid)
self.contactJid = contact.obj.contactJid
self.account = account
self.deviceId = account.omemo.getDeviceId()
self.deviceIds = OmemoKeysForContact.knownDevices(account: self.account, jid: self.contactJid)
self.selectedDeviceForDeletion = -1
}
Expand Down

0 comments on commit e609261

Please sign in to comment.