File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/src/main/java/me/capcom/smsgateway/modules/messages Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ class MessagesSettings(
138138 }
139139
140140 LIMIT_PERIOD -> {
141- val newValue = value?.let { Period .valueOf(it.toString()) }
141+ val newValue = value?.let { Period .valueOf(it.toString()) } ? : Period . Disabled
142142 val changed = this .limitPeriod != newValue
143143
144144 storage.set(key, newValue)
@@ -152,7 +152,7 @@ class MessagesSettings(
152152 throw IllegalArgumentException (" Limit value must be >= 1" )
153153 }
154154
155- val changed = this .limitValue != limitValue
155+ val changed = this .limitValue != ( limitValue ? : 0 )
156156
157157 storage.set(key, limitValue?.toString())
158158
@@ -161,6 +161,7 @@ class MessagesSettings(
161161
162162 SIM_SELECTION_MODE -> {
163163 val newValue = value?.let { SimSelectionMode .valueOf(it.toString()) }
164+ ? : SimSelectionMode .OSDefault
164165 val changed = this .simSelectionMode != newValue
165166
166167 storage.set(key, newValue)
@@ -170,6 +171,7 @@ class MessagesSettings(
170171
171172 PROCESSING_ORDER -> {
172173 val newValue = value?.let { ProcessingOrder .valueOf(it.toString()) }
174+ ? : ProcessingOrder .LIFO
173175 val changed = this .processingOrder != newValue
174176
175177 storage.set(key, newValue)
You can’t perform that action at this time.
0 commit comments