mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-01-31 17:04:59 +01:00
Fix build
This commit is contained in:
parent
3412eb6635
commit
4b137a8e2c
@ -237,6 +237,7 @@ dependencies {
|
||||
implementation "com.github.mariotaku.RestFu:okhttp3:${libVersions['RestFu']}"
|
||||
implementation "com.github.mariotaku.RestFu:logansquare:${libVersions['RestFu']}"
|
||||
implementation "com.squareup.okhttp3:okhttp:${libVersions['OkHttp']}"
|
||||
implementation("com.squareup.okio:okio:2.4.3")
|
||||
implementation 'com.lnikkila:extendedtouchview:0.1.1'
|
||||
implementation "com.google.dagger:dagger:${libVersions['Dagger']}"
|
||||
implementation 'org.attoparser:attoparser:2.0.4.RELEASE'
|
||||
|
1
twidere/proguard-rules.pro
vendored
1
twidere/proguard-rules.pro
vendored
@ -18,6 +18,7 @@
|
||||
|
||||
-dontobfuscate
|
||||
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
-dontwarn com.squareup.haha.**
|
||||
-dontwarn com.makeramen.roundedimageview.**
|
||||
-dontwarn jnamed**
|
||||
|
@ -19,8 +19,8 @@
|
||||
|
||||
package androidx.core.view
|
||||
|
||||
fun WindowInsetsCompat(obj: Any) = WindowInsetsCompat.wrap(obj)
|
||||
fun createWindowInsetsCompat(obj: Any) = WindowInsetsCompat(obj)
|
||||
|
||||
val WindowInsetsCompat.unwrapped: Any?
|
||||
@Suppress("RestrictedApi")
|
||||
get() = WindowInsetsCompat.unwrap(this)
|
||||
get() = this.toWindowInsets()
|
@ -53,7 +53,6 @@ import org.mariotaku.kpreferences.KPreferences
|
||||
import org.mariotaku.kpreferences.get
|
||||
import org.mariotaku.ktextension.activityLabel
|
||||
import org.mariotaku.ktextension.getSystemWindowInsets
|
||||
import org.mariotaku.ktextension.systemWindowInsets
|
||||
import org.mariotaku.ktextension.unregisterReceiverSafe
|
||||
import org.mariotaku.restfu.http.RestHttpClient
|
||||
import org.mariotaku.twidere.BuildConfig
|
||||
@ -204,7 +203,10 @@ open class BaseActivity : ChameleonActivity(), IBaseActivity<BaseActivity>, IThe
|
||||
|
||||
override fun onApplyWindowInsets(v: View, insets: WindowInsetsCompat): WindowInsetsCompat {
|
||||
if (systemWindowsInsets == null) {
|
||||
systemWindowsInsets = insets.systemWindowInsets
|
||||
systemWindowsInsets = Rect(insets.systemWindowInsets.left,
|
||||
insets.systemWindowInsets.top,
|
||||
insets.systemWindowInsets.right,
|
||||
insets.systemWindowInsets.bottom)
|
||||
} else {
|
||||
insets.getSystemWindowInsets(systemWindowsInsets!!)
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import android.annotation.SuppressLint
|
||||
import android.annotation.TargetApi
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.createWindowInsetsCompat
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.WindowInsets
|
||||
@ -55,7 +55,7 @@ open class ExtendedFrameLayout(context: Context, attrs: AttributeSet? = null) :
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(WindowInsetsCompat(insets))
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(createWindowInsetsCompat(insets))
|
||||
return super.onApplyWindowInsets(insets)
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ import android.annotation.SuppressLint
|
||||
import android.annotation.TargetApi
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.createWindowInsetsCompat
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
@ -64,7 +64,7 @@ class ExtendedImageView(context: Context, attrs: AttributeSet? = null) :
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(WindowInsetsCompat(insets))
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(createWindowInsetsCompat(insets))
|
||||
return super.onApplyWindowInsets(insets)
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ import android.annotation.SuppressLint
|
||||
import android.annotation.TargetApi
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.createWindowInsetsCompat
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.WindowInsets
|
||||
@ -54,7 +54,7 @@ class ExtendedLinearLayout(context: Context, attrs: AttributeSet? = null) : Line
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(WindowInsetsCompat(insets))
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(createWindowInsetsCompat(insets))
|
||||
return super.onApplyWindowInsets(insets)
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ import android.graphics.Rect
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.createWindowInsetsCompat
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.WindowInsets
|
||||
@ -109,7 +109,7 @@ open class ExtendedRelativeLayout(context: Context, attrs: AttributeSet? = null)
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(WindowInsetsCompat(insets))
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(createWindowInsetsCompat(insets))
|
||||
return super.onApplyWindowInsets(insets)
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ import android.annotation.SuppressLint
|
||||
import android.annotation.TargetApi
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.createWindowInsetsCompat
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.WindowInsets
|
||||
@ -74,7 +74,7 @@ class ExtendedSwipeRefreshLayout(context: Context, attrs: AttributeSet? = null)
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(WindowInsetsCompat(insets))
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(createWindowInsetsCompat(insets))
|
||||
return super.onApplyWindowInsets(insets)
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import android.annotation.SuppressLint
|
||||
import android.annotation.TargetApi
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.createWindowInsetsCompat
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
@ -81,7 +81,7 @@ class ProfileBannerImageView(context: Context, attrs: AttributeSet) :
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(WindowInsetsCompat(insets))
|
||||
onApplyWindowInsetsCompatListener?.onApplyWindowInsets(createWindowInsetsCompat(insets))
|
||||
return super.onApplyWindowInsets(insets)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user