Skip to content

Commit 1517748

Browse files
committed
IOS-5674 Refactor code
1 parent 5c1a6ed commit 1517748

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

TangemSdk/TangemSdk/Common/NFC/NFCReader.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ extension NFCReader: CardReader {
110110
var alertMessage: String {
111111
get { return _alertMessage ?? "" }
112112
set {
113-
guard !isBeingStopped else {
113+
if isBeingStopped {
114114
Log.nfc("Session is being stopped. Skip alert message.")
115115
return
116116
}
@@ -260,7 +260,11 @@ extension NFCReader: CardReader {
260260
}
261261

262262
func stopSession(with errorMessage: String? = nil) {
263-
guard !isBeingStopped || (readerSession?.isReady ?? false) else {
263+
guard (readerSession?.isReady == true) else {
264+
return
265+
}
266+
267+
if isBeingStopped {
264268
return
265269
}
266270

0 commit comments

Comments
 (0)