Fix some warnings & recreate lint-baseline.xml (#4278)

This commit is contained in:
Konrad Pozniak 2024-02-25 16:20:26 +01:00 committed by GitHub
commit 6249b53718
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 119 additions and 75 deletions

View file

@ -59,7 +59,7 @@ class AccountMediaRemoteMediator(
}
val attachments = statuses.flatMap { status ->
AttachmentViewData.list(status, activeAccount.alwaysShowSensitiveMedia ?: false)
AttachmentViewData.list(status, activeAccount.alwaysShowSensitiveMedia)
}
if (loadType == LoadType.REFRESH) {

View file

@ -27,7 +27,7 @@ import com.keylesspalace.tusky.viewdata.AttachmentViewData
import javax.inject.Inject
class AccountMediaViewModel @Inject constructor(
private val accountManager: AccountManager,
accountManager: AccountManager,
api: MastodonApi
) : ViewModel() {

View file

@ -966,7 +966,7 @@ class ComposeActivity :
private fun onMediaPick() {
addMediaBehavior.addBottomSheetCallback(
object : BottomSheetBehavior.BottomSheetCallback() {
object : BottomSheetCallback() {
override fun onStateChanged(bottomSheet: View, newState: Int) {
// Wait until bottom sheet is not collapsed and show next screen after
if (newState == BottomSheetBehavior.STATE_COLLAPSED) {

View file

@ -54,7 +54,7 @@ class CaptionDialog : DialogFragment() {
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
) = inflater.inflate(R.layout.dialog_image_description, container, false)
): View = inflater.inflate(R.layout.dialog_image_description, container, false)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val imageView = binding.imageDescriptionView

View file

@ -41,7 +41,7 @@ data class Links(val next: String?, val prev: String?) {
*
* Should only be called by a worker thread.
*
* @see NotificationWorker
* @see com.keylesspalace.tusky.worker.NotificationWorker
* @see <a href="https://developer.android.com/guide/background/persistent/threading/worker">Background worker</a>
*/
@WorkerThread

View file

@ -40,7 +40,6 @@ import org.xml.sax.XMLReader
class ViewEditsAdapter(
private val edits: List<StatusEdit>,
private val animateAvatars: Boolean,
private val animateEmojis: Boolean,
private val useBlurhash: Boolean,
private val listener: LinkListener

View file

@ -135,7 +135,6 @@ class ViewEditsFragment :
binding.recyclerView.adapter = ViewEditsAdapter(
edits = uiState.edits,
animateAvatars = animateAvatars,
animateEmojis = animateEmojis,
useBlurhash = useBlurhash,
listener = this@ViewEditsFragment