diff --git a/app/build.gradle b/app/build.gradle
index e47e090d7..bf676f3f5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -12,7 +12,7 @@ apply plugin: 'org.jetbrains.kotlin.android'
android {
compileSdk 35
- namespace 'it.niedermann.owncloud.notes'
+ namespace = 'it.niedermann.owncloud.notes'
defaultConfig {
applicationId "it.niedermann.owncloud.notes"
@@ -29,7 +29,7 @@ android {
}
compileOptions {
- coreLibraryDesugaringEnabled true
+ coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
@@ -39,13 +39,13 @@ android {
}
buildFeatures {
- viewBinding true
- buildConfig true
+ viewBinding = true
+ buildConfig = true
}
buildTypes {
debug {
- testCoverageEnabled true
+ testCoverageEnabled = true
}
release {
@@ -73,17 +73,17 @@ android {
testOptions {
unitTests {
- includeAndroidResources true
+ includeAndroidResources = true
}
}
lintOptions {
- abortOnError false
+ abortOnError = false
disable 'MissingTranslation'
}
androidResources {
- generateLocaleConfig true
+ generateLocaleConfig = true
}
packagingOptions {
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java
index 3da1941e6..8cf67449f 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java
@@ -33,6 +33,7 @@
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import com.nextcloud.android.sso.helper.SingleAccountHelper;
import com.owncloud.android.lib.common.utils.Log_OC;
import it.niedermann.owncloud.notes.R;
@@ -42,7 +43,6 @@
import it.niedermann.owncloud.notes.shared.model.ISyncCallback;
import it.niedermann.owncloud.notes.shared.util.DisplayUtils;
import kotlin.Unit;
-import kotlin.jvm.functions.Function0;
public class NoteEditFragment extends SearchableBaseNoteFragment {
@@ -306,7 +306,17 @@ public void applyBrand(int color) {
super.applyBrand(color);
final var util = BrandingUtil.of(color, requireContext());
- binding.editContent.setSearchColor(color);
+
+ lifecycleScopeIOJob(() -> {
+ try {
+ final var ssoAccount = SingleAccountHelper.getCurrentSingleSignOnAccount(getContext());
+ binding.editContent.setCurrentSingleSignOnAccount(ssoAccount, color);
+ } catch (Exception e) {
+ Log_OC.e(TAG, "applyBrand exception: " + e);
+ }
+ return Unit.INSTANCE;
+ });
+
binding.editContent.setHighlightColor(util.notes.getTextHighlightBackgroundColor(requireContext(), color, colorPrimary, colorAccent));
}
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java
index 681096400..b982baca9 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java
@@ -31,8 +31,6 @@
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
-import com.nextcloud.android.sso.exceptions.NextcloudFilesAppAccountNotFoundException;
-import com.nextcloud.android.sso.exceptions.NoCurrentAccountSelectedException;
import com.nextcloud.android.sso.helper.SingleAccountHelper;
import com.owncloud.android.lib.common.utils.Log_OC;
@@ -40,10 +38,8 @@
import it.niedermann.owncloud.notes.branding.BrandingUtil;
import it.niedermann.owncloud.notes.databinding.FragmentNotePreviewBinding;
import it.niedermann.owncloud.notes.persistence.entity.Note;
-import it.niedermann.owncloud.notes.shared.model.ISyncCallback;
import it.niedermann.owncloud.notes.shared.util.SSOUtil;
import kotlin.Unit;
-import kotlin.jvm.functions.Function0;
public class NotePreviewFragment extends SearchableBaseNoteFragment implements OnRefreshListener {
@@ -233,7 +229,17 @@ public void applyBrand(int color) {
super.applyBrand(color);
final var util = BrandingUtil.of(color, requireContext());
- binding.singleNoteContent.setSearchColor(color);
+
+ lifecycleScopeIOJob(() -> {
+ try {
+ final var ssoAccount = SingleAccountHelper.getCurrentSingleSignOnAccount(getContext());
+ binding.singleNoteContent.setCurrentSingleSignOnAccount(ssoAccount, color);
+ } catch (Exception e) {
+ Log_OC.e(TAG, "applyBrand exception: " + e);
+ }
+ return Unit.INSTANCE;
+ });
+
binding.singleNoteContent.setHighlightColor(util.notes.getTextHighlightBackgroundColor(requireContext(), color, colorPrimary, colorAccent));
}
diff --git a/build.gradle b/build.gradle
index ba23bbc9f..b6b8501c5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,7 +22,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:8.11.1'
+ classpath 'com.android.tools.build:gradle:8.12.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
// NOTE: Do not place your application dependencies here; they belong
@@ -34,7 +34,7 @@ allprojects {
repositories {
mavenCentral()
google()
- maven { url "https://jitpack.io" }
+ maven { url = "https://jitpack.io" }
}
}
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 55a72affa..12ea1259c 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -5,7 +5,7 @@
true
armored
-
+
@@ -361,6 +361,14 @@
+
+
+
+
+
+
+
+
@@ -1472,6 +1480,14 @@
+
+
+
+
+
+
+
+
@@ -1480,6 +1496,14 @@
+
+
+
+
+
+
+
+
@@ -1647,6 +1671,14 @@
+
+
+
+
+
+
+
+
@@ -1743,6 +1775,14 @@
+
+
+
+
+
+
+
+
@@ -1839,6 +1879,14 @@
+
+
+
+
+
+
+
+
@@ -3080,6 +3128,14 @@
+
+
+
+
+
+
+
+
@@ -3106,6 +3162,14 @@
+
+
+
+
+
+
+
+
@@ -3282,6 +3346,14 @@
+
+
+
+
+
+
+
+
@@ -3322,6 +3394,14 @@
+
+
+
+
+
+
+
+
@@ -3418,6 +3498,14 @@
+
+
+
+
+
+
+
+
@@ -3514,6 +3602,14 @@
+
+
+
+
+
+
+
+
@@ -3610,6 +3706,14 @@
+
+
+
+
+
+
+
+
@@ -3706,6 +3810,14 @@
+
+
+
+
+
+
+
+
@@ -3882,6 +3994,14 @@
+
+
+
+
+
+
+
+
@@ -4058,6 +4178,14 @@
+
+
+
+
+
+
+
+
@@ -4154,6 +4282,14 @@
+
+
+
+
+
+
+
+
@@ -4250,6 +4386,14 @@
+
+
+
+
+
+
+
+
@@ -4346,6 +4490,14 @@
+
+
+
+
+
+
+
+
@@ -4442,6 +4594,14 @@
+
+
+
+
+
+
+
+
@@ -4538,6 +4698,14 @@
+
+
+
+
+
+
+
+
@@ -4634,6 +4802,14 @@
+
+
+
+
+
+
+
+
@@ -4810,6 +4986,14 @@
+
+
+
+
+
+
+
+
@@ -4906,6 +5090,14 @@
+
+
+
+
+
+
+
+
@@ -5002,6 +5194,14 @@
+
+
+
+
+
+
+
+
@@ -5098,6 +5298,14 @@
+
+
+
+
+
+
+
+
@@ -5194,6 +5402,14 @@
+
+
+
+
+
+
+
+
@@ -5290,6 +5506,14 @@
+
+
+
+
+
+
+
+
@@ -5386,6 +5610,14 @@
+
+
+
+
+
+
+
+
@@ -5538,6 +5770,14 @@
+
+
+
+
+
+
+
+
@@ -5634,6 +5874,14 @@
+
+
+
+
+
+
+
+
@@ -5730,6 +5978,14 @@
+
+
+
+
+
+
+
+
@@ -5826,6 +6082,14 @@
+
+
+
+
+
+
+
+
@@ -5946,6 +6210,14 @@
+
+
+
+
+
+
+
+
@@ -6042,6 +6314,14 @@
+
+
+
+
+
+
+
+
@@ -6346,6 +6626,14 @@
+
+
+
+
+
+
+
+
@@ -6762,6 +7050,14 @@
+
+
+
+
+
+
+
+
@@ -6858,6 +7154,14 @@
+
+
+
+
+
+
+
+
@@ -6954,6 +7258,14 @@
+
+
+
+
+
+
+
+
@@ -7018,6 +7330,14 @@
+
+
+
+
+
+
+
+
@@ -7114,6 +7434,14 @@
+
+
+
+
+
+
+
+
@@ -7178,6 +7506,14 @@
+
+
+
+
+
+
+
+
@@ -7274,6 +7610,14 @@
+
+
+
+
+
+
+
+
@@ -7322,6 +7666,14 @@
+
+
+
+
+
+
+
+
@@ -7370,6 +7722,14 @@
+
+
+
+
+
+
+
+
@@ -7434,6 +7794,14 @@
+
+
+
+
+
+
+
+
@@ -7530,6 +7898,14 @@
+
+
+
+
+
+
+
+
@@ -7594,6 +7970,14 @@
+
+
+
+
+
+
+
+
@@ -7690,6 +8074,14 @@
+
+
+
+
+
+
+
+
@@ -7754,6 +8146,14 @@
+
+
+
+
+
+
+
+
@@ -7850,6 +8250,14 @@
+
+
+
+
+
+
+
+
@@ -7914,6 +8322,14 @@
+
+
+
+
+
+
+
+
@@ -7978,6 +8394,14 @@
+
+
+
+
+
+
+
+
@@ -8042,6 +8466,14 @@
+
+
+
+
+
+
+
+
@@ -8138,6 +8570,14 @@
+
+
+
+
+
+
+
+
@@ -8202,6 +8642,14 @@
+
+
+
+
+
+
+
+
@@ -8410,6 +8858,14 @@
+
+
+
+
+
+
+
+
@@ -8474,6 +8930,14 @@
+
+
+
+
+
+
+
+
@@ -8570,6 +9034,14 @@
+
+
+
+
+
+
+
+
@@ -13146,6 +13618,14 @@
+
+
+
+
+
+
+
+
@@ -13256,6 +13736,11 @@
+
+
+
+
+
@@ -13641,6 +14126,11 @@
+
+
+
+
+
@@ -13676,6 +14166,11 @@
+
+
+
+
+
@@ -13716,6 +14211,14 @@
+
+
+
+
+
+
+
+