Skip to content

Commit

Permalink
Bump compileSdk to 34
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Oct 28, 2023
1 parent 55ed684 commit 70b4da8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final def CUSTOM_INSTANCE = ""
final def SUPPORT_ACCOUNT_URL = "https://mastodon.social/@Tusky"

android {
compileSdk 33
compileSdk 34
namespace "com.keylesspalace.tusky"
defaultConfig {
applicationId APP_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ class PreferencesActivity :
super.onSaveInstanceState(outState)
}

override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
sharedPreferences ?: return
key ?: return
when (key) {
APP_THEME -> {
val theme = sharedPreferences.getNonNullString(APP_THEME, AppTheme.DEFAULT.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class ViewVideoFragment : ViewMediaFragment(), Injectable {

/** A fling up/down should dismiss the fragment */
override fun onFling(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
velocityX: Float,
velocityY: Float
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,21 +347,21 @@ class ClickableSpanTextView @JvmOverloads constructor(
return firstDiff < secondDiff
}

override fun onDraw(canvas: Canvas?) {
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)

// Paint span boundaries. Optimised out on release builds, or debug builds where
// showSpanBoundaries is false.
if (BuildConfig.DEBUG && showSpanBoundaries) {
canvas?.save()
canvas.save()
for (entry in delegateRects) {
canvas?.drawRect(entry.key, paddingDebugPaint)
canvas.drawRect(entry.key, paddingDebugPaint)
}

for (entry in spanRects) {
canvas?.drawRect(entry.key, spanDebugPaint)
canvas.drawRect(entry.key, spanDebugPaint)
}
canvas?.restore()
canvas.restore()
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/keylesspalace/tusky/view/GraphView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ class GraphView @JvmOverloads constructor(

private fun dataSpacing(data: List<Any>) = width.toFloat() / max(data.size - 1, 1).toFloat()

override fun onDraw(canvas: Canvas?) {
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)

if (primaryLinePath.isEmpty && width > 0) {
initializeVertices()
}

canvas?.apply {
canvas.apply {
drawRect(sizeRect, graphPaint)

val pointDistance = dataSpacing(primaryLineData)
Expand Down

0 comments on commit 70b4da8

Please sign in to comment.