Skip to content

Commit

Permalink
v4.2.3+402305
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmer committed Jan 2, 2024
1 parent bdec583 commit ac8543a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 52 deletions.
2 changes: 2 additions & 0 deletions lib/model/push_request_queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class PushRequestQueue {

PushRequest pop() => list.removeAt(0);

PushRequest? tryPop() => list.isNotEmpty ? list.removeAt(0) : null;

@override
String toString() {
return 'PushRequestQueue{_list: $list}';
Expand Down
12 changes: 4 additions & 8 deletions lib/state_notifiers/push_request_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class PushRequestNotifier extends StateNotifier<PushRequest?> {

// ACTIONS
Future<bool> acceptPop(PushToken pushToken) async {
if (pushToken.pushRequests.peek() == null) {
return false;
}
final pushRequest = pushToken.pushRequests.pop();
final pushRequest = pushToken.pushRequests.tryPop();
if (pushRequest == null) return false;
Logger.info('Approving push request.', name: 'push_request_notifier.dart#approve');
final updatedPushRequest = pushRequest.copyWith(accepted: true);
final successfullyApproved = await _handleReaction(pushRequest: updatedPushRequest, token: pushToken);
Expand All @@ -69,10 +67,8 @@ class PushRequestNotifier extends StateNotifier<PushRequest?> {
}

Future<bool> declinePop(PushToken pushToken) async {
if (pushToken.pushRequests.peek() == null) {
return false;
}
final pushRequest = pushToken.pushRequests.pop();
final pushRequest = pushToken.pushRequests.tryPop();
if (pushRequest == null) return false;
Logger.info('Decline push request.', name: 'push_request_notifier.dart#decline');
final updatedPushRequest = pushRequest.copyWith(accepted: false);
final successfullyDeclined = await _handleReaction(pushRequest: updatedPushRequest, token: pushToken);
Expand Down
4 changes: 3 additions & 1 deletion lib/utils/network_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class PrivacyIdeaIOClient {

/// Custom POST request allows to not verify certificates.
Future<Response> doPost({required Uri url, required Map<String, String?> body, bool sslVerify = true}) async {
if (kIsWeb) return Response('', 405);
if (kIsWeb) return Response('Platform not supported', 405);
Logger.info('Sending post request (SSLVerify: $sslVerify)', name: 'utils.dart#doPost');

List<MapEntry> entries = body.entries.where((element) => element.value == null).toList();
Expand All @@ -94,6 +94,8 @@ class PrivacyIdeaIOClient {
response = await ioClient.post(url, body: body);
} on SocketException catch (e, s) {
response = Response('${e.runtimeType} : $s', 404);
} on HandshakeException catch (e, s) {
response = Response('${e.runtimeType} : $s', 525);
}

if (response.statusCode != 200) {
Expand Down
84 changes: 42 additions & 42 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: _flutterfire_internals
sha256: eb0ac20f704799b986049fbb3c1c16421eca319a1b872378d669513e12452ba5
sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7
url: "https://pub.dev"
source: hosted
version: "1.3.14"
version: "1.3.16"
analyzer:
dependency: transitive
description:
Expand Down Expand Up @@ -101,10 +101,10 @@ packages:
dependency: transitive
description:
name: build_resolvers
sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8"
sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.4.2"
build_runner:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -133,10 +133,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2"
sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309
url: "https://pub.dev"
source: hosted
version: "8.8.0"
version: "8.8.1"
characters:
dependency: transitive
description:
Expand All @@ -157,10 +157,10 @@ packages:
dependency: transitive
description:
name: cli_util
sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
url: "https://pub.dev"
source: hosted
version: "0.4.0"
version: "0.4.1"
clock:
dependency: transitive
description:
Expand All @@ -173,10 +173,10 @@ packages:
dependency: transitive
description:
name: code_builder
sha256: b2151ce26a06171005b379ecff6e08d34c470180ffe16b8e14b6d52be292b55f
sha256: feee43a5c05e7b3199bb375a86430b8ada1b04104f2923d0e03cc01ca87b6d84
url: "https://pub.dev"
source: hosted
version: "4.8.0"
version: "4.9.0"
collection:
dependency: "direct main"
description:
Expand Down Expand Up @@ -293,10 +293,10 @@ packages:
dependency: "direct main"
description:
name: extended_nested_scroll_view
sha256: "444a6f883e6e07effc7639e69a309e1fb491b6c19b095e9281714a51ace2b384"
sha256: "835580d40c2c62b448bd14adecd316acba469ba61f1510ef559d17668a85e777"
url: "https://pub.dev"
source: hosted
version: "6.1.2"
version: "6.2.1"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -325,10 +325,10 @@ packages:
dependency: "direct main"
description:
name: firebase_core
sha256: d301561d614487688d797717bef013a264c517d1d09e4c5c1325c3a64c835efb
sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb"
url: "https://pub.dev"
source: hosted
version: "2.24.0"
version: "2.24.2"
firebase_core_platform_interface:
dependency: transitive
description:
Expand All @@ -341,34 +341,34 @@ packages:
dependency: transitive
description:
name: firebase_core_web
sha256: "10159d9ee42c79f4548971d92f3f0fcd5791f6738cda3583a4e3b2c8b244c018"
sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0
url: "https://pub.dev"
source: hosted
version: "2.9.0"
version: "2.10.0"
firebase_messaging:
dependency: "direct main"
description:
name: firebase_messaging
sha256: "260064e1b512a9e1970b5964d645eba888208ca3de42459c38e484c8ecdc37a9"
sha256: "199fe8186a5370d1cf5ce0819191079afc305914e8f38715f5e23943940dfe2d"
url: "https://pub.dev"
source: hosted
version: "14.7.6"
version: "14.7.9"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: "81fb8c983356dd75ee660f276c918380325df7a1ab1e981ede911809e9ddff30"
sha256: "54e283a0e41d81d854636ad0dad73066adc53407a60a7c3189c9656e2f1b6107"
url: "https://pub.dev"
source: hosted
version: "4.5.15"
version: "4.5.18"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "1c5d9b6cf929ab471300143059d1641a26b73c9c24adb5266e241aea23c090aa"
sha256: "90dc7ed885e90a24bb0e56d661d4d2b5f84429697fd2cbb9e5890a0ca370e6f4"
url: "https://pub.dev"
source: hosted
version: "3.5.15"
version: "3.5.18"
fixnum:
dependency: transitive
description:
Expand Down Expand Up @@ -415,10 +415,10 @@ packages:
dependency: "direct main"
description:
name: flutter_local_notifications
sha256: bb5cd63ff7c91d6efe452e41d0d0ae6348925c82eafd10ce170ef585ea04776e
sha256: "892ada16046d641263f30c72e7432397088810a84f34479f6677494802a2b535"
url: "https://pub.dev"
source: hosted
version: "16.2.0"
version: "16.3.0"
flutter_local_notifications_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -680,10 +680,10 @@ packages:
dependency: "direct main"
description:
name: local_auth_android
sha256: df4ccb3193525b8a60c78a5ca7bf188a47705bcf77bcc837a6b2cf6da64ae0e2
sha256: "54e9c35ce52c06333355ab0d0f41e4c06dbca354b23426765ba41dfb1de27598"
url: "https://pub.dev"
source: hosted
version: "1.0.35"
version: "1.0.36"
local_auth_ios:
dependency: "direct main"
description:
Expand Down Expand Up @@ -784,10 +784,10 @@ packages:
dependency: "direct dev"
description:
name: mockito
sha256: "4b693867cee1853c9d1d7ecc1871f27f39b2ef2c13c0d8d8507dfe5bebd8aaf1"
sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917"
url: "https://pub.dev"
source: hosted
version: "5.4.3"
version: "5.4.4"
mutex:
dependency: "direct main"
description:
Expand Down Expand Up @@ -864,10 +864,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
version: "2.2.2"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -1124,10 +1124,10 @@ packages:
dependency: transitive
description:
name: source_gen
sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.5.0"
source_helper:
dependency: transitive
description:
Expand Down Expand Up @@ -1300,10 +1300,10 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba
sha256: e9aa5ea75c84cf46b3db4eea212523591211c3cf2e13099ee4ec147f54201c86
url: "https://pub.dev"
source: hosted
version: "6.2.1"
version: "6.2.2"
url_launcher_android:
dependency: transitive
description:
Expand All @@ -1324,10 +1324,10 @@ packages:
dependency: transitive
description:
name: url_launcher_linux
sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd"
sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.1.1"
url_launcher_macos:
dependency: transitive
description:
Expand All @@ -1348,26 +1348,26 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: "138bd45b3a456dcfafc46d1a146787424f8d2edfbf2809c9324361e58f851cf7"
sha256: "7286aec002c8feecc338cc33269e96b73955ab227456e9fb2a91f7fab8a358e9"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
version: "2.2.2"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc"
sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.1.1"
uuid:
dependency: "direct main"
description:
name: uuid
sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921
sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f"
url: "https://pub.dev"
source: hosted
version: "4.2.1"
version: "4.2.2"
vector_math:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish_to: none
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 4.2.3+402304 # TODO Set the right version number
version: 4.2.3+402305 # TODO Set the right version number
# version: major.minor.build + 2x major|2x minor|3x build
# version: version number + build number (optional)
# android: build-name + versionCode
Expand Down

0 comments on commit ac8543a

Please sign in to comment.