add ktlint plugin to project and apply default code style (#2209)
* add ktlint plugin to project and apply default code style * some manual adjustments, fix wildcard imports * update CONTRIBUTING.md * fix formatting
This commit is contained in:
parent
955267199e
commit
16ffcca748
227 changed files with 3933 additions and 3371 deletions
|
|
@ -25,10 +25,10 @@ abstract class ViewMediaFragment : Fragment() {
|
|||
private var toolbarVisibiltyDisposable: Function0<Boolean>? = null
|
||||
|
||||
abstract fun setupMediaView(
|
||||
url: String,
|
||||
previewUrl: String?,
|
||||
description: String?,
|
||||
showingDescription: Boolean
|
||||
url: String,
|
||||
previewUrl: String?,
|
||||
description: String?,
|
||||
showingDescription: Boolean
|
||||
)
|
||||
|
||||
abstract fun onToolbarVisibilityChange(visible: Boolean)
|
||||
|
|
@ -56,7 +56,7 @@ abstract class ViewMediaFragment : Fragment() {
|
|||
Attachment.Type.VIDEO,
|
||||
Attachment.Type.GIFV,
|
||||
Attachment.Type.AUDIO -> ViewVideoFragment()
|
||||
else -> ViewImageFragment() // it probably won't show anything, but its better than crashing
|
||||
else -> ViewImageFragment() // it probably won't show anything, but its better than crashing
|
||||
}
|
||||
fragment.arguments = arguments
|
||||
return fragment
|
||||
|
|
@ -84,9 +84,9 @@ abstract class ViewMediaFragment : Fragment() {
|
|||
setupMediaView(url, previewUrl, description, showingDescription && mediaActivity.isToolbarVisible)
|
||||
|
||||
toolbarVisibiltyDisposable = (activity as ViewMediaActivity)
|
||||
.addToolbarVisibilityListener { isVisible ->
|
||||
onToolbarVisibilityChange(isVisible)
|
||||
}
|
||||
.addToolbarVisibilityListener { isVisible ->
|
||||
onToolbarVisibilityChange(isVisible)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue