Skip to content

Commit ad600a2

Browse files
committed
Updated libraries, fixed dates divider
1 parent 734005c commit ad600a2

15 files changed

Lines changed: 48 additions & 48 deletions

app/build.gradle

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
def final VERSION_CODE = 34
2-
def final VERSION_NAME = '1.3.0'
1+
def final VERSION_CODE = 35
2+
def final VERSION_NAME = '1.3.1'
33

44
apply plugin: 'com.android.application'
55
apply plugin: 'kotlin-android'
@@ -29,12 +29,6 @@ android {
2929
it.java.srcDirs += "src/$it.name/kotlin"
3030
}
3131

32-
kotlin {
33-
experimental {
34-
coroutines 'enable'
35-
}
36-
}
37-
3832
signingConfigs {
3933

4034
release {
@@ -89,18 +83,17 @@ android {
8983

9084
dependencies {
9185

92-
def final SUPPORT_VERSION = '1.0.0'
9386
def final ROOM_VERSION = '2.0.0'
9487
def final LIFECYCLE_VERSION = '2.0.0'
9588
def final LEAK_CANARY_VERSION = '1.6.2'
9689
def final ESPRESSO_VERSION = '3.1.0-alpha4'
97-
def final COROUTINES_VERSION = '0.30.2'
90+
def final COROUTINES_VERSION = '1.0.1'
9891

9992
implementation fileTree(dir: 'libs', include: ['*.jar'])
10093

101-
implementation "androidx.appcompat:appcompat:$SUPPORT_VERSION"
102-
implementation "androidx.recyclerview:recyclerview:$SUPPORT_VERSION"
103-
implementation "androidx.cardview:cardview:$SUPPORT_VERSION"
94+
implementation 'androidx.appcompat:appcompat:1.0.2'
95+
implementation 'androidx.recyclerview:recyclerview:1.0.0'
96+
implementation 'androidx.cardview:cardview:1.0.0'
10497
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
10598
implementation 'com.google.android.material:material:1.0.0'
10699

@@ -136,10 +129,10 @@ dependencies {
136129

137130
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
138131
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION"
139-
testImplementation 'io.mockk:mockk:1.8.9'
132+
testImplementation 'io.mockk:mockk:1.8.12'
140133
testImplementation 'junit:junit:4.12'
141134

142-
androidTestImplementation "androidx.annotation:annotation:$SUPPORT_VERSION"
135+
androidTestImplementation "androidx.annotation:annotation:1.0.1"
143136
androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION"
144137
androidTestImplementation "androidx.test.espresso:espresso-contrib:$ESPRESSO_VERSION"
145138
}

app/src/main/kotlin/com/glodanif/bluetoothchat/data/service/connection/ConnectionController.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import com.glodanif.bluetoothchat.ui.view.NotificationView
2424
import com.glodanif.bluetoothchat.ui.widget.ShortcutManager
2525
import com.glodanif.bluetoothchat.utils.LimitedQueue
2626
import com.glodanif.bluetoothchat.utils.Size
27-
import kotlinx.coroutines.experimental.*
27+
import kotlinx.coroutines.*
2828
import java.io.File
2929
import java.io.IOException
3030
import java.util.*
31-
import kotlin.coroutines.experimental.CoroutineContext
31+
import kotlin.coroutines.CoroutineContext
3232

3333
class ConnectionController(private val application: ChatApplication,
3434
private val subject: ConnectionSubject,

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/adapter/ChatAdapter.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ class ChatAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>(), StickyRecyc
120120
}
121121
}
122122

123-
override fun getHeaderId(position: Int): Long {
124-
return messages[position].dayOfYear.hashCode().toLong()
125-
}
123+
override fun getHeaderId(position: Int) = messages[position].dayOfYearRaw
126124

127125
override fun onCreateHeaderViewHolder(parent: ViewGroup): RecyclerView.ViewHolder {
128126
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_date_divider, parent, false)

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/presenter/BasePresenter.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import androidx.annotation.CallSuper
44
import androidx.lifecycle.Lifecycle
55
import androidx.lifecycle.LifecycleObserver
66
import androidx.lifecycle.OnLifecycleEvent
7-
import kotlinx.coroutines.experimental.CoroutineDispatcher
8-
import kotlinx.coroutines.experimental.CoroutineScope
9-
import kotlinx.coroutines.experimental.Dispatchers
10-
import kotlinx.coroutines.experimental.Job
11-
import kotlin.coroutines.experimental.CoroutineContext
7+
import kotlinx.coroutines.CoroutineDispatcher
8+
import kotlinx.coroutines.CoroutineScope
9+
import kotlinx.coroutines.Dispatchers
10+
import kotlinx.coroutines.Job
11+
import kotlin.coroutines.CoroutineContext
1212

1313
open class BasePresenter(private val uiDispatcher: CoroutineDispatcher = Dispatchers.Main): CoroutineScope, LifecycleObserver {
1414

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/presenter/ChatPresenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.glodanif.bluetoothchat.data.service.message.PayloadType
1111
import com.glodanif.bluetoothchat.data.service.message.TransferringFile
1212
import com.glodanif.bluetoothchat.ui.view.ChatView
1313
import com.glodanif.bluetoothchat.ui.viewmodel.converter.ChatMessageConverter
14-
import kotlinx.coroutines.experimental.*
14+
import kotlinx.coroutines.*
1515
import java.io.File
1616

1717
class ChatPresenter(private val deviceAddress: String,

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/presenter/ContactChooserPresenter.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import androidx.lifecycle.OnLifecycleEvent
55
import com.glodanif.bluetoothchat.data.model.ConversationsStorage
66
import com.glodanif.bluetoothchat.ui.view.ContactChooserView
77
import com.glodanif.bluetoothchat.ui.viewmodel.converter.ContactConverter
8-
import kotlinx.coroutines.experimental.CoroutineDispatcher
9-
import kotlinx.coroutines.experimental.Dispatchers
10-
import kotlinx.coroutines.experimental.launch
11-
import kotlinx.coroutines.experimental.withContext
8+
import kotlinx.coroutines.CoroutineDispatcher
9+
import kotlinx.coroutines.Dispatchers
10+
import kotlinx.coroutines.launch
11+
import kotlinx.coroutines.withContext
1212

1313
class ContactChooserPresenter(private val view: ContactChooserView,
1414
private val model: ConversationsStorage,

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/presenter/ConversationsPresenter.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import com.glodanif.bluetoothchat.data.model.*
99
import com.glodanif.bluetoothchat.ui.view.ConversationsView
1010
import com.glodanif.bluetoothchat.ui.viewmodel.ConversationViewModel
1111
import com.glodanif.bluetoothchat.ui.viewmodel.converter.ConversationConverter
12-
import kotlinx.coroutines.experimental.CoroutineDispatcher
13-
import kotlinx.coroutines.experimental.Dispatchers
14-
import kotlinx.coroutines.experimental.launch
15-
import kotlinx.coroutines.experimental.withContext
12+
import kotlinx.coroutines.CoroutineDispatcher
13+
import kotlinx.coroutines.Dispatchers
14+
import kotlinx.coroutines.launch
15+
import kotlinx.coroutines.withContext
1616

1717
class ConversationsPresenter(private val view: ConversationsView,
1818
private val connection: BluetoothConnector,

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/presenter/ImagePreviewPresenter.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package com.glodanif.bluetoothchat.ui.presenter
33
import com.glodanif.bluetoothchat.data.model.MessagesStorage
44
import com.glodanif.bluetoothchat.ui.view.ImagePreviewView
55
import com.glodanif.bluetoothchat.utils.toReadableFileSize
6-
import kotlinx.coroutines.experimental.CoroutineDispatcher
7-
import kotlinx.coroutines.experimental.Dispatchers
8-
import kotlinx.coroutines.experimental.launch
6+
import kotlinx.coroutines.CoroutineDispatcher
7+
import kotlinx.coroutines.Dispatchers
8+
import kotlinx.coroutines.launch
99
import java.io.File
1010

1111
class ImagePreviewPresenter(private val messageId: Long,

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/presenter/ProfilePresenter.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import com.glodanif.bluetoothchat.data.model.BluetoothScanner
77
import com.glodanif.bluetoothchat.data.model.ProfileManager
88
import com.glodanif.bluetoothchat.data.service.message.Contract
99
import com.glodanif.bluetoothchat.ui.view.ProfileView
10-
import kotlinx.coroutines.experimental.*
10+
import kotlinx.coroutines.CoroutineDispatcher
11+
import kotlinx.coroutines.Dispatchers
12+
import kotlinx.coroutines.launch
13+
import kotlinx.coroutines.withContext
1114

1215
class ProfilePresenter(private val view: ProfileView,
1316
private val settings: ProfileManager,

app/src/main/kotlin/com/glodanif/bluetoothchat/ui/presenter/ReceivedImagesPresenter.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package com.glodanif.bluetoothchat.ui.presenter
22

33
import com.glodanif.bluetoothchat.data.model.MessagesStorage
44
import com.glodanif.bluetoothchat.ui.view.ReceivedImagesView
5-
import kotlinx.coroutines.experimental.CoroutineDispatcher
6-
import kotlinx.coroutines.experimental.Dispatchers
7-
import kotlinx.coroutines.experimental.launch
8-
import kotlinx.coroutines.experimental.withContext
5+
import kotlinx.coroutines.CoroutineDispatcher
6+
import kotlinx.coroutines.Dispatchers
7+
import kotlinx.coroutines.launch
8+
import kotlinx.coroutines.withContext
99

1010
class ReceivedImagesPresenter(private val address: String,
1111
private val view: ReceivedImagesView,

0 commit comments

Comments
 (0)