Skip to content

Commit 9802d73

Browse files
authored
Merge pull request #176 from mindbox-cloud/release/2.14.3
Release 2.14.3
2 parents 885ae16 + 80c00ee commit 9802d73

File tree

18 files changed

+64
-47
lines changed

18 files changed

+64
-47
lines changed

example/flutter_example/lib/view_model/view_model.dart

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'package:mindbox/mindbox.dart';
22
import 'package:permission_handler/permission_handler.dart';
33

44
class ViewModel {
5-
65
//https://developers.mindbox.ru/docs/%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D1%8B-flutter-sdk
76
static syncOperation() {
87
Mindbox.instance.executeSyncOperation(
@@ -34,17 +33,14 @@ class ViewModel {
3433
//used for send action "notification center was opened"
3534
static asyncOperationNCOpen() {
3635
Mindbox.instance.executeAsyncOperation(
37-
operationSystemName: "mobileapp.NCOpen",
38-
operationBody: {}
39-
);
36+
operationSystemName: "mobileapp.NCOpen", operationBody: {});
4037
}
4138

4239
//used for send action "click on push from notification center"
4340
static asyncOperationNCPushOpen(String pushName, String pushDate) {
4441
Mindbox.instance.executeAsyncOperation(
4542
operationSystemName: "mobileapp.NCPushOpen",
46-
operationBody: getPushOpenOperationBody(pushName, pushDate)
47-
);
43+
operationBody: getPushOpenOperationBody(pushName, pushDate));
4844
}
4945

5046
static getSDKVersion(Function complition) {
@@ -70,8 +66,8 @@ class ViewModel {
7066
var status = await Permission.notification.status;
7167
if (!status.isGranted) {
7268
status = await Permission.notification.request();
73-
Mindbox.instance.updateNotificationPermissionStatus(
74-
granted: status.isGranted);
69+
Mindbox.instance
70+
.updateNotificationPermissionStatus(granted: status.isGranted);
7571
}
7672
}
7773

@@ -103,7 +99,8 @@ class ViewModel {
10399
}
104100
}
105101

106-
static Map<String, dynamic> getPushOpenOperationBody(String pushName, String pushDate) {
102+
static Map<String, dynamic> getPushOpenOperationBody(
103+
String pushName, String pushDate) {
107104
return {
108105
"data": {
109106
"customerAction": {

mindbox/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.14.3
2+
3+
* Upgrade native Android SDK dependency to v2.14.4.
4+
* Upgrade native iOS SDK dependency to v2.14.4.
5+
16
## 2.14.2
27

38
* Upgrade native Android SDK dependency to v2.14.3.

mindbox/lib/mindbox.dart

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,24 @@ class Mindbox {
147147
MindboxPlatform.instance.registerInAppCallbacks(inAppCallbacks: callbacks);
148148
}
149149

150-
/// Updates the notification permission status.
150+
/// This method is kept for backward compatibility. The `granted` argument is ignored.
151151
///
152-
/// The [granted] parameter specifies whether the permission for notifications
153-
/// has been granted:
154-
///
155-
/// - `true` indicates that the user has granted permission.
156-
/// - `false` indicates that the user has denied permission.
152+
/// The SDK reads the current system authorization status and, if it differs
153+
/// from the last known value, sends an update to the backend.
154+
@Deprecated('Use `refreshNotificationPermissionStatus` instead')
155+
void updateNotificationPermissionStatus({required bool granted}) {
156+
MindboxPlatform.instance.refreshNotificationPermissionStatus();
157+
}
158+
159+
/// Checks the current system authorization status for push notifications
160+
/// and reports any changes to Mindbox.
157161
///
158162
/// Example usage:
159163
/// ```dart
160-
/// Mindbox.instance.updateNotificationPermissionStatus(granted: true);
161-
void updateNotificationPermissionStatus({required bool granted}) {
162-
MindboxPlatform.instance
163-
.updateNotificationPermissionStatus(granted: granted);
164+
/// Mindbox.instance.refreshNotificationPermissionStatus();
165+
/// ```
166+
void refreshNotificationPermissionStatus() {
167+
MindboxPlatform.instance.refreshNotificationPermissionStatus();
164168
}
165169

166170
/// Writes a log message to the native Mindbox logging system.

mindbox/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mindbox
22
description: Flutter Mindbox SDK. Plugin wrapper over of Mindbox iOS/Android SDK.
3-
version: 2.14.2
3+
version: 2.14.3
44
homepage: https://mindbox.cloud/
55
repository: https://github.com/mindbox-cloud/flutter-sdk/tree/master/mindbox
66
documentation: https://developers.mindbox.ru/docs/flutter-sdk-integration
@@ -20,9 +20,9 @@ flutter:
2020
dependencies:
2121
flutter:
2222
sdk: flutter
23-
mindbox_android: ^2.14.2
24-
mindbox_ios: ^2.14.2
25-
mindbox_platform_interface: ^2.14.2
23+
mindbox_android: ^2.14.3
24+
mindbox_ios: ^2.14.3
25+
mindbox_platform_interface: ^2.14.3
2626

2727
dev_dependencies:
2828
flutter_test:

mindbox_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.14.3
2+
3+
* Upgrade native Android SDK dependency to v2.14.4.
4+
15
## 2.14.2
26

37
* Upgrade native Android SDK dependency to v2.14.3.

mindbox_android/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ android {
5050

5151
dependencies {
5252
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
53-
api 'cloud.mindbox:mobile-sdk:2.14.3'
53+
api 'cloud.mindbox:mobile-sdk:2.14.4'
5454
}

mindbox_android/android/src/main/kotlin/cloud/mindbox/mindbox_android/MindboxAndroidPlugin.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ class MindboxAndroidPlugin : FlutterPlugin, MethodCallHandler, ActivityAware, Ne
160160
}
161161
}
162162
}
163-
"updateNotificationPermissionStatus" -> {
163+
164+
"refreshNotificationPermissionStatus" -> {
164165
Mindbox.updateNotificationPermissionStatus(context = context)
165166
}
166167

mindbox_android/lib/src/mindbox_android_platform.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class MindboxAndroidPlatform extends MindboxPlatform {
104104

105105
// Method for to send notification permission status
106106
@override
107-
void updateNotificationPermissionStatus({required bool granted}) {
108-
_methodHandler.updateNotificationPermissionStatus(granted: granted);
107+
void refreshNotificationPermissionStatus() {
108+
_methodHandler.refreshNotificationPermissionStatus();
109109
}
110110

111111
@override

mindbox_android/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mindbox_android
22
description: The implementation of 'mindbox' plugin for the Android platform.
3-
version: 2.14.2
3+
version: 2.14.3
44
homepage: https://mindbox.cloud/
55
repository: https://github.com/mindbox-cloud/flutter-sdk/tree/master/mindbox_android
66

@@ -19,7 +19,7 @@ flutter:
1919
dependencies:
2020
flutter:
2121
sdk: flutter
22-
mindbox_platform_interface: ^2.14.2
22+
mindbox_platform_interface: ^2.14.3
2323

2424
dev_dependencies:
2525
flutter_test:

mindbox_ios/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.14.3
2+
3+
* Upgrade native iOS SDK dependency to v2.14.4.
4+
15
## 2.14.2
26

37
* Upgrade native iOS SDK dependency to v2.14.3.

0 commit comments

Comments
 (0)