@akylas/nativescript-app-utils 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.1.1](https://github.com/akylas/nativescript-app-utils/compare/v2.1.0...v2.1.1) (2024-10-05)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **android:** allow to prepare activity without enabling dynamic colors ([103a466](https://github.com/akylas/nativescript-app-utils/commit/103a4669487767b0674dc06a3d1a991717300b5c))
11
+
6
12
  ## [2.1.0](https://github.com/akylas/nativescript-app-utils/compare/v2.0.0...v2.1.0) (2024-10-03)
7
13
 
8
14
  **Note:** Version bump only for package @akylas/nativescript-app-utils
@@ -5,7 +5,7 @@ export declare namespace AppUtilsAndroid {
5
5
  function getDimensionFromInt(context: android.content.Context, intToGet: number): number;
6
6
  function getColorFromInt(context: android.content.Context, intToGet: number): number;
7
7
  function getColorFromName(context: android.content.Context, name: string): number;
8
- function prepareActivity(activity: androidx.appcompat.app.AppCompatActivity): any;
8
+ function prepareActivity(activity: androidx.appcompat.app.AppCompatActivity, applyDynamicColors?: boolean): any;
9
9
  function applyDayNight(activity: androidx.appcompat.app.AppCompatActivity, applyDynamicColors: boolean): any;
10
10
  function applyDynamicColors(activity: androidx.appcompat.app.AppCompatActivity): any;
11
11
  }
package/index.android.js CHANGED
@@ -51,8 +51,8 @@ export var AppUtilsAndroid;
51
51
  return UtilsCompanion.getColorFromName(context, name);
52
52
  }
53
53
  AppUtilsAndroid.getColorFromName = getColorFromName;
54
- function prepareActivity(activity) {
55
- return UtilsCompanion.prepareActivity(activity);
54
+ function prepareActivity(activity, applyDynamicColors = true) {
55
+ return UtilsCompanion.prepareActivity(activity, applyDynamicColors);
56
56
  }
57
57
  AppUtilsAndroid.prepareActivity = prepareActivity;
58
58
  function applyDayNight(activity, applyDynamicColors) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akylas/nativescript-app-utils",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Provides API for changing the styles of SystemUI (StatusBar, NavigationBar...) on iOS.",
5
5
  "main": "index",
6
6
  "sideEffects": false,
@@ -63,5 +63,5 @@
63
63
  "bugs": {
64
64
  "url": "https://github.com/akylas/nativescript-app-utils/issues"
65
65
  },
66
- "gitHead": "6ce2a1f258fe5424db0b4e4273e9fdd76d51e44c"
66
+ "gitHead": "23dbebb1eed5374be644bb39f8dd2ede6ed43a86"
67
67
  }
@@ -10,6 +10,4 @@ dependencies {
10
10
  implementation "androidx.core:core-splashscreen:$androidXSplashscreenVersion"
11
11
  implementation "androidx.core:core:$androidxVersion"
12
12
  implementation "androidx.exifinterface:exifinterface:$androidXExifInterface"
13
-
14
-
15
13
  }
@@ -65,8 +65,11 @@ class Utils {
65
65
  val systemLocale: Locale?
66
66
  get() = ConfigurationCompat.getLocales(Resources.getSystem().configuration)[0]
67
67
 
68
- fun prepareActivity(activity: AppCompatActivity) {
69
- DynamicColors.applyToActivityIfAvailable(activity)
68
+ @JvmOverloads
69
+ fun prepareActivity(activity: AppCompatActivity, applyDynamicColors: Boolean = true) {
70
+ if (applyDynamicColors) {
71
+ DynamicColors.applyToActivityIfAvailable(activity)
72
+ }
70
73
  activity.installSplashScreen()
71
74
  prepareWindow(activity.window)
72
75
  }