File tree Expand file tree Collapse file tree 4 files changed +16
-9
lines changed
src/main/kotlin/com/glodanif/bluetoothchat Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 1- def final VERSION_CODE = 26
2- def final VERSION_NAME = ' 1.2.4 '
1+ def final VERSION_CODE = 27
2+ def final VERSION_NAME = ' 1.2.5 '
33
44apply plugin : ' com.android.application'
55apply plugin : ' kotlin-android'
@@ -125,7 +125,7 @@ dependencies {
125125 implementation ' com.github.chrisbanes:PhotoView:2.1.3'
126126 implementation ' io.github.kobakei:ratethisapp:1.2.0'
127127
128- implementation(' com.crashlytics.sdk.android:crashlytics:2.9.2 @aar' ) {
128+ implementation(' com.crashlytics.sdk.android:crashlytics:2.9.3 @aar' ) {
129129 transitive = true
130130 }
131131
Original file line number Diff line number Diff line change @@ -312,25 +312,25 @@ class BluetoothConnectorImpl(private val context: Context) : BluetoothConnector
312312
313313 override fun removeOnPrepareListener (listener : OnPrepareListener ) {
314314 synchronized(monitor) {
315- prepareListeners safeRemove listener
315+ prepareListeners. safeRemove( listener)
316316 }
317317 }
318318
319319 override fun removeOnConnectListener (listener : OnConnectionListener ) {
320320 synchronized(monitor) {
321- connectListeners safeRemove listener
321+ connectListeners. safeRemove( listener)
322322 }
323323 }
324324
325325 override fun removeOnMessageListener (listener : OnMessageListener ) {
326326 synchronized(monitor) {
327- messageListeners safeRemove listener
327+ messageListeners. safeRemove( listener)
328328 }
329329 }
330330
331331 override fun removeOnFileListener (listener : OnFileListener ) {
332332 synchronized(monitor) {
333- fileListeners safeRemove listener
333+ fileListeners. safeRemove( listener)
334334 }
335335 }
336336
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class TransferEventStrategy : DataTransferThread.EventsStrategy {
2020 message.substring(2 ).substringBefore(" #" ).toLong()
2121 } catch (e: NumberFormatException ) {
2222
23- val exception = NumberFormatException (e.message + " | " + message)
23+ val exception = NumberFormatException (e.message + " | " + fileStartRegex.find( message)?.value )
2424
2525 if (Fabric .isInitialized()) {
2626 Crashlytics .getInstance().core.logException(exception)
Original file line number Diff line number Diff line change @@ -57,7 +57,14 @@ fun Animation.onEnd(action: () -> Unit) {
5757 })
5858}
5959
60- infix fun <T > MutableSet<T>.safeRemove (item : T ) = this .iterator().let {
60+ inline fun <T > MutableSet<T>.safeForEach (action : (T ) -> Unit ) = this .iterator().let {
61+
62+ while (it.hasNext()) {
63+ action.invoke(it.next())
64+ }
65+ }
66+
67+ fun <T > MutableSet<T>.safeRemove (item : T ) = this .iterator().let {
6168
6269 while (it.hasNext()) {
6370 if (it.next() == item) {
You can’t perform that action at this time.
0 commit comments