fix some lint warnings
This commit is contained in:
parent
1ae3e86378
commit
ef66deeae7
36 changed files with 52 additions and 105 deletions
|
|
@ -28,7 +28,6 @@ import androidx.core.view.ViewCompat
|
|||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.ViewMediaActivity
|
||||
import com.keylesspalace.tusky.di.Injectable
|
||||
|
|
@ -234,9 +233,8 @@ class AccountMediaFragment : BaseFragment(), Injectable {
|
|||
}
|
||||
|
||||
private fun viewMedia(items: List<AttachmentViewData>, currentIndex: Int, view: View?) {
|
||||
val type = items[currentIndex].attachment.type
|
||||
|
||||
when (type) {
|
||||
when (items[currentIndex].attachment.type) {
|
||||
Attachment.Type.IMAGE,
|
||||
Attachment.Type.GIFV,
|
||||
Attachment.Type.VIDEO -> {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ import android.widget.ProgressBar;
|
|||
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.keylesspalace.tusky.R;
|
||||
import com.keylesspalace.tusky.adapter.NotificationsAdapter;
|
||||
import com.keylesspalace.tusky.adapter.StatusBaseViewHolder;
|
||||
|
|
@ -154,7 +153,6 @@ public class NotificationsFragment extends SFragment implements
|
|||
private LinearLayoutManager layoutManager;
|
||||
private EndlessOnScrollListener scrollListener;
|
||||
private NotificationsAdapter adapter;
|
||||
private TabLayout.OnTabSelectedListener onTabSelectedListener;
|
||||
private Button buttonFilter;
|
||||
private boolean hideFab;
|
||||
private boolean topLoading;
|
||||
|
|
|
|||
|
|
@ -84,13 +84,13 @@ class ViewVideoFragment : ViewMediaFragment() {
|
|||
videoView.setOnPreparedListener { mp ->
|
||||
progressBar.hide()
|
||||
mp.isLooping = true
|
||||
if (arguments!!.getBoolean(ViewMediaFragment.ARG_START_POSTPONED_TRANSITION)) {
|
||||
if (arguments!!.getBoolean(ARG_START_POSTPONED_TRANSITION)) {
|
||||
hideToolbarAfterDelay(TOOLBAR_HIDE_DELAY_MS)
|
||||
videoView.start()
|
||||
}
|
||||
}
|
||||
|
||||
if (arguments!!.getBoolean(ViewMediaFragment.ARG_START_POSTPONED_TRANSITION)) {
|
||||
if (arguments!!.getBoolean(ARG_START_POSTPONED_TRANSITION)) {
|
||||
mediaActivity.onBringUp()
|
||||
}
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ class ViewVideoFragment : ViewMediaFragment() {
|
|||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
val attachment = arguments?.getParcelable<Attachment>(ViewMediaFragment.ARG_ATTACHMENT)
|
||||
val attachment = arguments?.getParcelable<Attachment>(ARG_ATTACHMENT)
|
||||
val url: String
|
||||
|
||||
if (attachment == null) {
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ class AccountPreferencesFragment : PreferenceFragmentCompat(),
|
|||
return drawable
|
||||
}
|
||||
|
||||
fun launchFilterActivity(filterContext: String, titleResource: Int): Boolean {
|
||||
private fun launchFilterActivity(filterContext: String, titleResource: Int): Boolean {
|
||||
val intent = Intent(context, FiltersActivity::class.java)
|
||||
intent.putExtra(FiltersActivity.FILTERS_CONTEXT, filterContext)
|
||||
intent.putExtra(FiltersActivity.FILTERS_TITLE, getString(titleResource))
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ package com.keylesspalace.tusky.fragment.preference
|
|||
import android.content.SharedPreferences
|
||||
import android.os.Bundle
|
||||
import androidx.preference.EditTextPreference
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import com.keylesspalace.tusky.R
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue