update Kotlin to 1.4.10 and fix some warnigs (#1963)
This commit is contained in:
parent
e0346a8e88
commit
6d27d822ca
20 changed files with 74 additions and 94 deletions
|
|
@ -7,7 +7,6 @@ import android.view.ViewGroup
|
|||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.paging.PagedList
|
||||
import androidx.paging.PagedListAdapter
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
|
|
@ -61,11 +60,11 @@ abstract class SearchFragment<T> : Fragment(),
|
|||
}
|
||||
|
||||
private fun subscribeObservables() {
|
||||
data.observe(viewLifecycleOwner, Observer {
|
||||
data.observe(viewLifecycleOwner) {
|
||||
adapter.submitList(it)
|
||||
})
|
||||
}
|
||||
|
||||
networkStateRefresh.observe(viewLifecycleOwner, Observer {
|
||||
networkStateRefresh.observe(viewLifecycleOwner) {
|
||||
|
||||
searchProgressBar.visible(it == NetworkState.LOADING)
|
||||
|
||||
|
|
@ -73,17 +72,16 @@ abstract class SearchFragment<T> : Fragment(),
|
|||
showError()
|
||||
}
|
||||
checkNoData()
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
networkState.observe(viewLifecycleOwner, Observer {
|
||||
networkState.observe(viewLifecycleOwner) {
|
||||
|
||||
progressBarBottom.visible(it == NetworkState.LOADING)
|
||||
|
||||
if (it.status == Status.FAILED) {
|
||||
showError()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkNoData() {
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ import android.net.Uri
|
|||
import android.os.Environment
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.CheckBox
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
|
|
@ -376,9 +374,10 @@ class SearchStatusesFragment : SearchFragment<Pair<Status, StatusViewData.Concre
|
|||
private fun onMute(accountId: String, accountUsername: String) {
|
||||
showMuteAccountDialog(
|
||||
this.requireActivity(),
|
||||
accountUsername,
|
||||
{ notifications -> viewModel.muteAccount(accountId, notifications) }
|
||||
)
|
||||
accountUsername
|
||||
) { notifications ->
|
||||
viewModel.muteAccount(accountId, notifications)
|
||||
}
|
||||
}
|
||||
|
||||
private fun accountIsInMentions(account: AccountEntity?, mentions: Array<Mention>): Boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue