update deps, fix some lint warnings
This commit is contained in:
parent
35f4512e6c
commit
15d607b799
10 changed files with 32 additions and 41 deletions
|
@ -373,9 +373,9 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
|
|||
accountFollowingTextView.text = numberFormat.format(account.followingCount)
|
||||
accountStatusesTextView.text = numberFormat.format(account.statusesCount)
|
||||
|
||||
accountFloatingActionButton.setOnClickListener { _ -> mention() }
|
||||
accountFloatingActionButton.setOnClickListener { mention() }
|
||||
|
||||
accountFollowButton.setOnClickListener { _ ->
|
||||
accountFollowButton.setOnClickListener {
|
||||
if (isSelf) {
|
||||
val intent = Intent(this@AccountActivity, EditProfileActivity::class.java)
|
||||
startActivity(intent)
|
||||
|
|
|
@ -142,7 +142,7 @@ class EditProfileActivity : BaseActivity(), Injectable {
|
|||
}
|
||||
}
|
||||
is Error -> {
|
||||
val snackbar = Snackbar.make(avatarButton, R.string.error_generic, Snackbar.LENGTH_LONG);
|
||||
val snackbar = Snackbar.make(avatarButton, R.string.error_generic, Snackbar.LENGTH_LONG)
|
||||
snackbar.setAction(R.string.action_retry) {
|
||||
viewModel.obtainProfile()
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ class ViewMediaActivity : BaseActivity(), ViewImageFragment.PhotoActionsListener
|
|||
actionBar.setDisplayShowHomeEnabled(true)
|
||||
actionBar.title = adapter.getPageTitle(initialPosition)
|
||||
}
|
||||
toolbar.setNavigationOnClickListener { _ -> supportFinishAfterTransition() }
|
||||
toolbar.setNavigationOnClickListener { supportFinishAfterTransition() }
|
||||
toolbar.setOnMenuItemClickListener { item: MenuItem ->
|
||||
when (item.itemId) {
|
||||
R.id.action_download -> downloadMedia()
|
||||
|
@ -194,7 +194,7 @@ class ViewMediaActivity : BaseActivity(), ViewImageFragment.PhotoActionsListener
|
|||
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
downloadMedia()
|
||||
} else {
|
||||
showErrorDialog(toolbar, R.string.error_media_download_permission, R.string.action_retry) { _ -> downloadMedia() }
|
||||
showErrorDialog(toolbar, R.string.error_media_download_permission, R.string.action_retry) { downloadMedia() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,10 +49,6 @@ class ViewImageFragment : ViewMediaFragment() {
|
|||
private lateinit var toolbar: View
|
||||
override lateinit var descriptionView : TextView
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ViewImageFragment"
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
photoActionsListener = context as PhotoActionsListener
|
||||
|
@ -64,9 +60,9 @@ class ViewImageFragment : ViewMediaFragment() {
|
|||
attacher = PhotoViewAttacher(photoView)
|
||||
|
||||
// Clicking outside the photo closes the viewer.
|
||||
attacher.setOnOutsidePhotoTapListener { _ -> photoActionsListener.onDismiss() }
|
||||
attacher.setOnOutsidePhotoTapListener { photoActionsListener.onDismiss() }
|
||||
|
||||
attacher.setOnClickListener { _ -> onMediaTap() }
|
||||
attacher.setOnClickListener { onMediaTap() }
|
||||
|
||||
/* A vertical swipe motion also closes the viewer. This is especially useful when the photo
|
||||
* mostly fills the screen so clicking outside is difficult. */
|
||||
|
|
|
@ -37,7 +37,6 @@ abstract class ViewMediaFragment : BaseFragment() {
|
|||
@JvmStatic protected val ARG_START_POSTPONED_TRANSITION = "startPostponedTransition"
|
||||
@JvmStatic protected val ARG_ATTACHMENT = "attach"
|
||||
@JvmStatic protected val ARG_AVATAR_URL = "avatarUrl"
|
||||
private const val TAG = "ViewMediaFragment"
|
||||
|
||||
@JvmStatic
|
||||
fun newInstance(attachment: Attachment, shouldStartPostponedTransition: Boolean): ViewMediaFragment {
|
||||
|
|
|
@ -49,10 +49,6 @@ class ViewVideoFragment : ViewMediaFragment() {
|
|||
override lateinit var descriptionView : TextView
|
||||
private lateinit var mediaController : MediaController
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ViewVideoFragment"
|
||||
}
|
||||
|
||||
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
|
||||
// Start/pause/resume video playback as fragment is shown/hidden
|
||||
super.setUserVisibleHint(isVisibleToUser)
|
||||
|
|
|
@ -42,21 +42,21 @@ class PreferencesFragment : PreferenceFragmentCompat() {
|
|||
textSizePreference.icon = IconicsDrawable(context, GoogleMaterial.Icon.gmd_format_size).sizePx(iconSize).color(ThemeUtils.getColor(context, R.attr.toolbar_icon_tint))
|
||||
|
||||
val timelineFilterPreferences = findPreference("timelineFilterPreferences")
|
||||
timelineFilterPreferences.setOnPreferenceClickListener { _ ->
|
||||
activity?.let {
|
||||
val intent = PreferencesActivity.newIntent(it, PreferencesActivity.TAB_FILTER_PREFERENCES)
|
||||
it.startActivity(intent)
|
||||
it.overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left)
|
||||
timelineFilterPreferences.setOnPreferenceClickListener {
|
||||
activity?.let { activity ->
|
||||
val intent = PreferencesActivity.newIntent(activity, PreferencesActivity.TAB_FILTER_PREFERENCES)
|
||||
activity.startActivity(intent)
|
||||
activity.overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left)
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
val httpProxyPreferences = findPreference("httpProxyPreferences")
|
||||
httpProxyPreferences.setOnPreferenceClickListener { _ ->
|
||||
activity?.let {
|
||||
val intent = PreferencesActivity.newIntent(it, PreferencesActivity.PROXY_PREFERENCES)
|
||||
it.startActivity(intent)
|
||||
it.overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left)
|
||||
httpProxyPreferences.setOnPreferenceClickListener {
|
||||
activity?.let { activity ->
|
||||
val intent = PreferencesActivity.newIntent(activity, PreferencesActivity.PROXY_PREFERENCES)
|
||||
activity.startActivity(intent)
|
||||
activity.overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left)
|
||||
}
|
||||
true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue