Update gradle, kotlin and other dependencies (#2291)

* update gradle, kotlin and other dependencies

* fix new warnings

* remove unused import

* update Proguard rules

* add explicit dependency on Gson to get the newest version

* remove debug flag from proguard rules again

* fix typo
This commit is contained in:
Konrad Pozniak 2022-01-20 21:10:32 +01:00 committed by GitHub
commit 1586817c3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 56 additions and 34 deletions

View file

@ -52,6 +52,7 @@ import kotlinx.coroutines.launch
import java.io.IOException
import javax.inject.Inject
@OptIn(ExperimentalPagingApi::class)
class ConversationsFragment : SFragment(), StatusActionListener, Injectable, ReselectableFragment {
@Inject
@ -72,7 +73,6 @@ class ConversationsFragment : SFragment(), StatusActionListener, Injectable, Res
return inflater.inflate(R.layout.fragment_timeline, container, false)
}
@ExperimentalPagingApi
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val preferences = PreferenceManager.getDefaultSharedPreferences(view.context)

View file

@ -7,7 +7,7 @@ import androidx.paging.RemoteMediator
import com.keylesspalace.tusky.db.AppDatabase
import com.keylesspalace.tusky.network.MastodonApi
@ExperimentalPagingApi
@OptIn(ExperimentalPagingApi::class)
class ConversationsRemoteMediator(
private val accountId: Long,
private val api: MastodonApi,

View file

@ -37,7 +37,7 @@ class ConversationsViewModel @Inject constructor(
private val api: MastodonApi
) : RxAwareViewModel() {
@ExperimentalPagingApi
@OptIn(ExperimentalPagingApi::class)
val conversationFlow = Pager(
config = PagingConfig(pageSize = 10, enablePlaceholders = false, initialLoadSize = 20),
remoteMediator = ConversationsRemoteMediator(accountManager.activeAccount!!.id, api, database),