File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
app/src/main/kotlin/org/fossify/messages/extensions Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Fixed
11+
12+ - Fixed inability to view messages when there is no SIM card ([ #461 ] )
13+
1014## [ 1.2.1] - 2025-06-17
1115
1216### Changed
@@ -171,3 +175,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
171175[ #279 ] : https://github.com/FossifyOrg/Messages/issues/279
172176[ #287 ] : https://github.com/FossifyOrg/Messages/issues/287
173177[ #294 ] : https://github.com/FossifyOrg/Messages/issues/294
178+ [ #461 ] : https://github.com/FossifyOrg/Messages/issues/461
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import me.leolin.shortcutbadger.ShortcutBadger
3030import org.fossify.commons.extensions.areDigitsOnly
3131import org.fossify.commons.extensions.getBlockedNumbers
3232import org.fossify.commons.extensions.getIntValue
33+ import org.fossify.commons.extensions.getIntValueOr
3334import org.fossify.commons.extensions.getLongValue
3435import org.fossify.commons.extensions.getMyContactsCursor
3536import org.fossify.commons.extensions.getStringValue
@@ -161,7 +162,11 @@ fun Context.getMessages(
161162 val date = (cursor.getLongValue(Sms .DATE ) / 1000 ).toInt()
162163 val read = cursor.getIntValue(Sms .READ ) == 1
163164 val thread = cursor.getLongValue(Sms .THREAD_ID )
164- val subscriptionId = cursor.getIntValue(Sms .SUBSCRIPTION_ID )
165+ val subscriptionId = cursor.getIntValueOr(
166+ key = Sms .SUBSCRIPTION_ID ,
167+ defaultValue = SubscriptionManager .INVALID_SUBSCRIPTION_ID
168+ )
169+
165170 val status = cursor.getIntValue(Sms .STATUS )
166171 val participants = senderNumber.split(ADDRESS_SEPARATOR ).map { number ->
167172 val phoneNumber = PhoneNumber (number, 0 , " " , number)
You can’t perform that action at this time.
0 commit comments