Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synchronized access fix, monochrome icon support #123

Merged
8 commits merged into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/buildCi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
java-version: 17

- name: Cache Gradle dependencies
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
if: ${{ false }}
with:
path: |
Expand All @@ -43,7 +43,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle-

- name: Cache build cache
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
path: |
${{ github.workspace }}/.ccache
Expand All @@ -64,7 +64,7 @@ jobs:

- name: Build apk
id: buildAllApks
uses: gradle/gradle-build-action@v2.1.6
uses: gradle/gradle-build-action@v2.2.0
with:
gradle-version: wrapper
arguments: assembleDebug
Expand All @@ -88,7 +88,7 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.0-rc4"
BUILD_TOOLS_VERSION: "33.0.0"

- name: Delete old APK
run: rm app/build/outputs/apk/debug/app-debug.apk
Expand All @@ -97,7 +97,7 @@ jobs:
run: mv app/build/outputs/apk/debug/app-debug-signed.apk app/build/outputs/apk/debug/app-debug.apk

- name: Upload Artifact
uses: actions/upload-artifact@v3.0.0
uses: actions/upload-artifact@v3.1.0
with:
name: Debug Artifact
path: app/build/outputs/apk/debug/app-debug.apk
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
java-version: 17

- name: Cache Gradle dependencies
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
if: ${{ false }}
with:
path: |
Expand All @@ -166,7 +166,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle-

- name: Cache build cache
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
path: |
${{ github.workspace }}/.ccache
Expand All @@ -187,7 +187,7 @@ jobs:

- name: Build apk
id: buildAllApks
uses: gradle/gradle-build-action@v2.1.6
uses: gradle/gradle-build-action@v2.2.0
with:
gradle-version: wrapper
arguments: assembleRelease
Expand All @@ -211,13 +211,13 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.0-rc4"
BUILD_TOOLS_VERSION: "33.0.0"

- name: Rename APK
run: mv app/build/outputs/apk/release/app-release-unsigned-signed.apk app/build/outputs/apk/release/app-release.apk

- name: Upload Artifact
uses: actions/upload-artifact@v3.0.0
uses: actions/upload-artifact@v3.1.0
with:
name: Debug Artifact
path: app/build/outputs/apk/release/app-release.apk
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/buildPro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle-

- name: Cache build cache
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
path: |
${{ github.workspace }}/.ccache
Expand All @@ -48,7 +48,7 @@ jobs:

- name: Build apk
id: buildAllApks
uses: gradle/gradle-build-action@v2.1.6
uses: gradle/gradle-build-action@v2.2.0
with:
gradle-version: wrapper
arguments: assemblePro
Expand All @@ -74,7 +74,7 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.0-rc4"
BUILD_TOOLS_VERSION: "33.0.0"

- name: List files
run: ls app/build/outputs/apk/pro
Expand All @@ -83,7 +83,7 @@ jobs:
run: mv app/build/outputs/apk/pro/app-pro-unsigned-signed.apk app/build/outputs/apk/pro/app-pro.apk

- name: Upload Artifact
uses: actions/upload-artifact@v3.0.0
uses: actions/upload-artifact@v3.1.0
with:
name: Release Artifact
path: app/build/outputs/apk/pro/app-pro.apk
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
java-version: 17

- name: Cache Gradle dependencies
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
path: |
~/.gradle/caches
Expand All @@ -35,7 +35,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle-

- name: Cache build cache
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.4
with:
path: |
${{ github.workspace }}/.ccache
Expand All @@ -51,7 +51,7 @@ jobs:

- name: Build apk
id: buildAllApks
uses: eskatos/gradle-command-action@v2.1.6
uses: gradle/gradle-build-action@v2.2.0
with:
gradle-version: wrapper
wrapper-cache-enabled: true
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.0-rc4"
BUILD_TOOLS_VERSION: "33.0.0"

- name: List files
run: ls app/build/outputs/apk/release
Expand All @@ -89,7 +89,7 @@ jobs:
run: mv app/build/outputs/apk/release/app-release-unsigned-signed.apk app/build/outputs/apk/release/app-release.apk

- name: Upload Artifact
uses: actions/upload-artifact@v3.0.0
uses: actions/upload-artifact@v3.1.0
with:
name: Release Artifact
path: app/build/outputs/apk/release/app-release.apk
4 changes: 2 additions & 2 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ plugins {
kotlin("kapt")
}

val libsuVersion = "5.0.1"
val libsuVersion = "5.0.2"
val kotlinVersion: String = project.getKotlinPluginVersion()

android {
compileSdkPreview = "Tiramisu"
buildToolsVersion = "33.0.0-rc4"
compileSdk = 33
buildToolsVersion = "33.0.0"
buildFeatures.dataBinding = true
buildFeatures.viewBinding = true

defaultConfig {
applicationId = "de.dertyp7214.rboardthememanager"
minSdk = 23
targetSdk = 32
targetSdk = 33
versionCode = 353000
versionName = "3.5.3"

Expand Down Expand Up @@ -89,27 +89,27 @@ android {
}*/

dependencies {
implementation(platform("com.google.firebase:firebase-bom:30.0.1"))
implementation(platform("com.google.firebase:firebase-bom:30.1.0"))
implementation("com.google.firebase:firebase-messaging-ktx:23.0.5")
implementation("com.google.firebase:firebase-analytics-ktx:21.0.0")

implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.navigation:navigation-fragment-ktx:2.5.0-rc01")
implementation("androidx.navigation:navigation-ui-ktx:2.5.0-rc01")
implementation("androidx.navigation:navigation-fragment-ktx:2.5.0-rc02")
implementation("androidx.navigation:navigation-ui-ktx:2.5.0-rc02")
implementation("org.apache.commons:commons-text:1.9")

implementation("com.github.topjohnwu.libsu:core:$libsuVersion")
implementation("com.github.topjohnwu.libsu:io:$libsuVersion")
implementation("com.github.topjohnwu.libsu:nio:$libsuVersion")
implementation("dev.chrisbanes.insetter:insetter:0.6.1")
implementation("androidx.core:core-ktx:1.9.0-alpha04")
implementation("androidx.core:core-ktx:1.9.0-alpha05")
//noinspection DifferentStdlibGradleVersion
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0-RC")
implementation("androidx.core:core:1.9.0-alpha04")
implementation("com.google.android.material:material:1.7.0-alpha01")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0")
implementation("androidx.core:core:1.9.0-alpha05")
implementation("com.google.android.material:material:1.7.0-alpha02")
implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha02")
implementation("androidx.preference:preference-ktx:1.2.0")
implementation("androidx.activity:activity-ktx:1.6.0-alpha04")
implementation("androidx.activity:activity-ktx:1.6.0-alpha05")
implementation("androidx.fragment:fragment-ktx:1.5.0-rc01")
implementation("com.jaredrummler:android-shell:1.0.0")
implementation("com.google.firebase:firebase-analytics:21.0.0")
Expand All @@ -119,17 +119,17 @@ dependencies {
implementation("de.dertyp7214:PRDownloader:v0.6.0")
implementation("com.github.skydoves:balloon:1.4.6-SNAPSHOT")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.4-alpha06")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0-alpha06")
androidTestImplementation("androidx.test.ext:junit:1.1.4-alpha07")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0-alpha07")
implementation("androidx.browser:browser:1.4.0")
implementation("com.github.bumptech.glide:glide:4.13.2")
kapt("com.github.bumptech.glide:compiler:4.13.2")
implementation("de.dertyp7214:PreferencesPlus:1.1")
implementation("com.github.murgupluoglu:flagkit-android:1.0.2")
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar", "*.aar"))))

debugImplementation("androidx.compose.ui:ui-tooling:1.2.0-beta02")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.0-RC")
debugImplementation("androidx.compose.ui:ui-tooling:1.2.0-rc01")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.0")

/*var grpc_version = "1.45.0"
implementation("io.grpc:grpc-android:$grpc_version")
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.RboardThemeManagerV3"
tools:ignore="AllowBackup">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ class ChipContainer(context: Context, attrs: AttributeSet?) : LinearLayout(conte
}

fun setChips(chips: List<String>) {
this.chips.clear()
this.chips.addAll(chips.map { ChipData(it, false) }
.sortedBy { it.text.lowercase(Locale.getDefault()) })
refreshChips()
synchronized(this.chips) {
this.chips.clear()
this.chips.addAll(chips.map { ChipData(it, false) }
.sortedBy { it.text.lowercase(Locale.getDefault()) })
refreshChips()
}
}

fun setOnFilterToggle(listener: (filters: List<String>) -> Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.appcompat.widget.PopupMenu
import androidx.core.widget.doOnTextChanged
import com.google.android.material.card.MaterialCardView
import de.dertyp7214.rboardthememanager.R
import de.dertyp7214.rboardthememanager.core.delayed

@SuppressLint("ResourceType", "ServiceCast")
class SearchBar(context: Context, attrs: AttributeSet? = null) : LinearLayout(context, attrs) {
Expand Down Expand Up @@ -193,9 +194,7 @@ class SearchBar(context: Context, attrs: AttributeSet? = null) : LinearLayout(co

private fun clearFocus(editText: EditText) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Handler(Looper.getMainLooper()).postDelayed({
editText.windowInsetsController?.hide(WindowInsets.Type.ime())
}, 100)
editText.windowInsetsController?.let { it::hide.delayed(100, WindowInsets.Type.ime()) }
} else {
editText.clearFocus()
val imm: InputMethodManager =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package de.dertyp7214.rboardthememanager.core

import kotlin.reflect.KFunction

fun <R> KFunction<R>.delayed(delay: Long, vararg args: Any? = arrayOf()) {
delayed(delay) {
call(*args)
}
}
Loading