mirror of
https://github.com/pachli/pachli-android.git
synced 2025-02-02 18:37:00 +01:00
change: Disable SyntheticAccessor lint rule (#424)
Does not appear to be adding value, and R8 optimises the code to remove the generated accessors.
This commit is contained in:
parent
5a51310af8
commit
d01c72b7d7
File diff suppressed because it is too large
Load Diff
@ -51,6 +51,10 @@
|
||||
<!-- Set OldTargetApi back to warning -->
|
||||
<issue id="OldTargetApi" severity="warning" />
|
||||
|
||||
<!-- Disable SyntheticAccessor warnings; R8 handles them effectively, see
|
||||
https://github.com/google/dagger/issues/635#issuecomment-459110004 -->
|
||||
<issue id="SyntheticAccessor" severity="ignore" />
|
||||
|
||||
<!-- Mark all other lint issues as errors -->
|
||||
<issue id="all" severity="error" />
|
||||
</lint>
|
||||
|
@ -161,7 +161,6 @@ class NotificationsFragment :
|
||||
actionButton?.visible(viewModel.uiState.value.showFabWhileScrolling || dy == 0)
|
||||
}
|
||||
|
||||
@Suppress("SyntheticAccessor")
|
||||
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
|
||||
newState != SCROLL_STATE_IDLE && return
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
package app.pachli.components.trending
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
@ -69,7 +68,6 @@ class TrendingActivity : BottomSheetActivity(), AppBarLayoutHost, MenuProvider {
|
||||
onBackPressedDispatcher.addCallback(
|
||||
this,
|
||||
object : OnBackPressedCallback(true) {
|
||||
@SuppressLint("SyntheticAccessor")
|
||||
override fun handleOnBackPressed() {
|
||||
if (binding.pager.currentItem != 0) binding.pager.currentItem = 0 else finish()
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
package app.pachli.components.trending
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
@ -90,7 +89,6 @@ class TrendingTagsFragment :
|
||||
|
||||
adapter.registerAdapterDataObserver(
|
||||
object : RecyclerView.AdapterDataObserver() {
|
||||
@SuppressLint("SyntheticAccessor")
|
||||
override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {
|
||||
if (positionStart == 0 && adapter.itemCount != itemCount) {
|
||||
binding.recyclerView.post {
|
||||
|
@ -211,7 +211,7 @@ class ViewVideoFragment : ViewMediaFragment() {
|
||||
}
|
||||
|
||||
mediaPlayerListener = object : Player.Listener {
|
||||
@SuppressLint("ClickableViewAccessibility", "SyntheticAccessor")
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@OptIn(UnstableApi::class)
|
||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
||||
when (playbackState) {
|
||||
@ -238,7 +238,6 @@ class ViewVideoFragment : ViewMediaFragment() {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SyntheticAccessor")
|
||||
override fun onPlayerError(error: PlaybackException) {
|
||||
binding.progressBar.hide()
|
||||
val message = getString(
|
||||
@ -337,7 +336,6 @@ class ViewVideoFragment : ViewMediaFragment() {
|
||||
mediaAttachment.previewUrl?.let { url ->
|
||||
Glide.with(this).load(url).into(
|
||||
object : CustomTarget<Drawable>() {
|
||||
@SuppressLint("SyntheticAccessor")
|
||||
override fun onResourceReady(
|
||||
resource: Drawable,
|
||||
transition: Transition<in Drawable>?,
|
||||
@ -346,7 +344,6 @@ class ViewVideoFragment : ViewMediaFragment() {
|
||||
binding.videoView.defaultArtwork = resource
|
||||
}
|
||||
|
||||
@SuppressLint("SyntheticAccessor")
|
||||
override fun onLoadCleared(placeholder: Drawable?) {
|
||||
view ?: return
|
||||
binding.videoView.defaultArtwork = null
|
||||
@ -408,7 +405,6 @@ class ViewVideoFragment : ViewMediaFragment() {
|
||||
binding.mediaDescription.animate().alpha(alpha)
|
||||
.setListener(
|
||||
object : AnimatorListenerAdapter() {
|
||||
@SuppressLint("SyntheticAccessor")
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
view ?: return
|
||||
binding.mediaDescription.visible(isDescriptionVisible)
|
||||
|
@ -12,17 +12,6 @@
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `textStyle` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" textStyle(sharedPreferencesRepository.getString(PrefKeys.STATUS_TEXT_SIZE, "medium")!!)"
|
||||
errorLine2=" ~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/activity/BaseActivity.kt"
|
||||
line="104"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SelectableText"
|
||||
message="Consider making the text value selectable by specifying `android:textIsSelectable="true"`"
|
||||
|
@ -1,70 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="6" by="lint 8.1.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.2)" variant="all" version="8.1.2">
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `isSameDate` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" isSameDate(time, now, tz) -> sameDaySdf.format(time)"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/common/util/AbsoluteTimeFormatter.kt"
|
||||
line="36"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `isSameDate` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" isSameDate(time, now, tz) -> sameDaySdf.format(time)"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/common/util/AbsoluteTimeFormatter.kt"
|
||||
line="36"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `isSameDate` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" isSameDate(time, now, tz) -> sameDaySdf.format(time)"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/common/util/AbsoluteTimeFormatter.kt"
|
||||
line="36"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `isSameYear` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" isSameYear(time, now, tz) -> sameYearSdf.format(time)"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/common/util/AbsoluteTimeFormatter.kt"
|
||||
line="37"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `isSameYear` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" isSameYear(time, now, tz) -> sameYearSdf.format(time)"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/common/util/AbsoluteTimeFormatter.kt"
|
||||
line="37"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `isSameYear` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" isSameYear(time, now, tz) -> sameYearSdf.format(time)"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/common/util/AbsoluteTimeFormatter.kt"
|
||||
line="37"
|
||||
column="13"/>
|
||||
</issue>
|
||||
<issues format="6" by="lint 8.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.2)" variant="all" version="8.2.2">
|
||||
|
||||
</issues>
|
||||
|
@ -1,26 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="6" by="lint 8.2.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.0)" variant="all" version="8.2.0">
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `swapHost` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" builder.url(swapHost(originalRequest.url, instanceHeader))"
|
||||
errorLine2=" ~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/network/retrofit/InstanceSwitchAuthInterceptor.kt"
|
||||
line="54"
|
||||
column="29"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `swapHost` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" builder.url(swapHost(originalRequest.url, it.domain))"
|
||||
errorLine2=" ~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/core/network/retrofit/InstanceSwitchAuthInterceptor.kt"
|
||||
line="59"
|
||||
column="37"/>
|
||||
</issue>
|
||||
<issues format="6" by="lint 8.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.2)" variant="all" version="8.2.2">
|
||||
|
||||
</issues>
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
package app.pachli.feature.about
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
@ -67,7 +66,6 @@ class AboutActivity : BottomSheetActivity(), MenuProvider {
|
||||
onBackPressedDispatcher.addCallback(
|
||||
this,
|
||||
object : OnBackPressedCallback(true) {
|
||||
@SuppressLint("SyntheticAccessor")
|
||||
override fun handleOnBackPressed() {
|
||||
if (binding.pager.currentItem != 0) binding.pager.currentItem = 0 else finish()
|
||||
}
|
||||
|
@ -1,105 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="6" by="lint 8.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.2.2)" variant="all" version="8.2.2">
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `canonicalizeDomain` of class `Companion` requires synthetic accessor"
|
||||
errorLine1=" val domain = canonicalizeDomain(binding.domainEditText.text.toString())"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginActivity.kt"
|
||||
line="159"
|
||||
column="22"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `getBinding` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" binding.loginProgress.hide()"
|
||||
errorLine2=" ~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="144"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `getBinding` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" binding.loginProgress.hide()"
|
||||
errorLine2=" ~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="144"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" sendResult(LoginResult.Err(getString(R.string.error_could_not_load_login_page)))"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="153"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" sendResult(LoginResult.Err(getString(R.string.error_could_not_load_login_page)))"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="153"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" sendResult(LoginResult.Err(error))"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="174"
|
||||
column="25"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" sendResult(LoginResult.Err(error))"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="174"
|
||||
column="25"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" sendResult(LoginResult.Ok(code))"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="177"
|
||||
column="25"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SyntheticAccessor"
|
||||
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
|
||||
errorLine1=" sendResult(LoginResult.Ok(code))"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/app/pachli/feature/login/LoginWebViewActivity.kt"
|
||||
line="177"
|
||||
column="25"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SelectableText"
|
||||
message="Consider making the text value selectable by specifying `android:textIsSelectable="true"`"
|
||||
|
Loading…
x
Reference in New Issue
Block a user