From d72f58721a2857277d0e26b579064e36b442a620 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 17 Mar 2021 15:50:26 +0200 Subject: [PATCH 1/4] Undo changing permission request buttons to "Continue" (#560). --- CHANGELOG.md | 1 + assets/strings.en.json | 6 +++--- assets/strings.es.json | 6 +++--- assets/strings.zh.json | 6 +++--- lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart | 2 +- lib/ui/onboarding/OnboardingAuthLocationPanel.dart | 2 +- lib/ui/onboarding/OnboardingAuthNotificationsPanel.dart | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7d9b4b..18da677d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +- Undo changing permission request buttons to "Continue" [#560](https://github.com/rokwire/safer-illinois-app/issues/560). ## [2.9.21] - 2021-03-16 ### Changed diff --git a/assets/strings.en.json b/assets/strings.en.json index 788f9a09..3cf114b6 100644 --- a/assets/strings.en.json +++ b/assets/strings.en.json @@ -60,7 +60,7 @@ "panel.onboarding.location.label.title": "Turn on Location Services", "panel.onboarding.location.label.title.hint": "Header 1", "panel.onboarding.location.label.description": "Background location is required for Bluetooth-based exposure notification to work on your phone", - "panel.onboarding.location.button.allow.title": "Continue", + "panel.onboarding.location.button.allow.title": "Enable Location Services", "panel.onboarding.location.button.allow.hint": "", "panel.onboarding.location.button.dont_allow.title": "Not right now", "panel.onboarding.location.button.dont_allow.hint": "Skip sharing location", @@ -70,7 +70,7 @@ "panel.onboarding.bluetooth.label.title": "Enable Bluetooth", "panel.onboarding.bluetooth.label.title.hint": "Header 1", "panel.onboarding.bluetooth.label.description": "Use Bluetooth to alert you to potential exposure to COVID-19.", - "panel.onboarding.bluetooth.button.allow.title": "Continue", + "panel.onboarding.bluetooth.button.allow.title": "Enable Bluetooth", "panel.onboarding.bluetooth.button.allow.hint": "", "panel.onboarding.bluetooth.button.dont_allow.title": "Not right now", "panel.onboarding.bluetooth.button.dont_allow.hint": "Skip enabling Bluetooth", @@ -81,7 +81,7 @@ "panel.onboarding.notifications.label.title.hint": "Header 1", "panel.onboarding.notifications.label.description1": "Get notified about COVID-19 info", "panel.onboarding.notifications.label.description2": "This is required for Exposure Notifications to work in background on your phone", - "panel.onboarding.notifications.button.allow.title": "Continue", + "panel.onboarding.notifications.button.allow.title": "Enable Notifications", "panel.onboarding.notifications.button.allow.hint": "", "panel.onboarding.notifications.button.dont_allow.title": "Not right now", "panel.onboarding.notifications.button.dont_allow.hint": "Skip receiving notifications", diff --git a/assets/strings.es.json b/assets/strings.es.json index 03ed2fc4..c521bb5f 100644 --- a/assets/strings.es.json +++ b/assets/strings.es.json @@ -60,7 +60,7 @@ "panel.onboarding.location.label.title": "Activar los servicios de ubicación", "panel.onboarding.location.label.hint": "Encabezado 1", "panel.onboarding.location.label.description": "Se requiere una ubicación en segundo plano para que la notificación de exposición basada en Bluetooth funcione en su teléfono ", - "panel.onboarding.location.button.allow.title": "Comenzar", + "panel.onboarding.location.button.allow.title": "Servicio de localización activado", "panel.onboarding.location.button.allow.hint": "", "panel.onboarding.location.button.dont_allow.title": "No en este momento", "panel.onboarding.location.button.dont_allow.hint": "Omitir ubicación para compartir", @@ -70,7 +70,7 @@ "panel.onboarding.bluetooth.label.title": "Habilitar Bluetooth", "panel.onboarding.bluetooth.label.title.hint": "Encabezado 1", "panel.onboarding.bluetooth.label.description": "Usar Bluetooth para alertarlo sobre la posible exposición al COVID-19.", - "panel.onboarding.bluetooth.button.allow.title": "Comenzar", + "panel.onboarding.bluetooth.button.allow.title": "Habilitar Bluetooth", "panel.onboarding.bluetooth.button.allow.hint": "", "panel.onboarding.bluetooth.button.dont_allow.title": "No en este momento", "panel.onboarding.bluetooth.button.dont_allow.hint": "Omitir habilitar Bluetooth", @@ -81,7 +81,7 @@ "panel.onboarding.notifications.label.hint": "Encabezado 1", "panel.onboarding.notifications.label.description1": "Reciba notificaciones sobre la información de COVID-19", "panel.onboarding.notifications.label.description2": "Esto es necesario para que las notificaciones de exposición funcionen en segundo plano en su teléfono", - "panel.onboarding.notifications.button.allow.title": "Comenzar", + "panel.onboarding.notifications.button.allow.title": "Permitir notificaciones", "panel.onboarding.notifications.button.allow.hint": "", "panel.onboarding.notifications.button.dont_allow.title": "No en este momento", "panel.onboarding.notifications.button.dont_allow.hint": "Omitir recibir notificaciones", diff --git a/assets/strings.zh.json b/assets/strings.zh.json index 614c1bf0..50441eea 100644 --- a/assets/strings.zh.json +++ b/assets/strings.zh.json @@ -60,7 +60,7 @@ "panel.onboarding.location.label.title": "打开位置服务", "panel.onboarding.location.label.title.hint": "标题1", "panel.onboarding.location.label.description": "要在手機上使用基於藍牙的曝光通知,需要背景位置", - "panel.onboarding.location.button.allow.title": "继续", + "panel.onboarding.location.button.allow.title": "啟用位置服務", "panel.onboarding.location.button.allow.hint": "", "panel.onboarding.location.button.dont_allow.title": "暂时不", "panel.onboarding.location.button.dont_allow.hint": "跳过共享位置", @@ -70,7 +70,7 @@ "panel.onboarding.bluetooth.label.title": "启用蓝牙", "panel.onboarding.bluetooth.label.title.hint": "标题1", "panel.onboarding.bluetooth.label.description": "使用藍牙提醒您可能接觸到COVID-19.", - "panel.onboarding.bluetooth.button.allow.title": "继续", + "panel.onboarding.bluetooth.button.allow.title": "启用蓝牙", "panel.onboarding.bluetooth.button.allow.hint": "", "panel.onboarding.bluetooth.button.dont_allow.title": "不是现在", "panel.onboarding.bluetooth.button.dont_allow.hint": "跳过启用蓝牙", @@ -81,7 +81,7 @@ "panel.onboarding.notifications.label.hint": "标题1", "panel.onboarding.notifications.label.description1": "您將收到COVID-19信息", "panel.onboarding.notifications.label.description2": "這是曝光通知在手機上後台運行所必需的", - "panel.onboarding.notifications.button.allow.title": "继续", + "panel.onboarding.notifications.button.allow.title": "啟用位置服務", "panel.onboarding.notifications.button.allow.hint": "", "panel.onboarding.notifications.button.dont_allow.title": "暂时不", "panel.onboarding.notifications.button.dont_allow.hint": "跳过接收通知", diff --git a/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart b/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart index 1cc77a42..e3a75049 100644 --- a/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart +++ b/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart @@ -134,7 +134,7 @@ class _OnboardingAuthBluetoothPanelState extends State[ ScalableRoundedButton( - label: Localization().getStringEx('panel.onboarding.notifications.button.allow.title', 'Continue'), + label: Localization().getStringEx('panel.onboarding.notifications.button.allow.title', 'Enable Notifications'), hint: Localization().getStringEx('panel.onboarding.notifications.button.allow.hint', ''), borderColor: Styles().colors.fillColorSecondary, backgroundColor: Styles().colors.background, From 80a277c751a12380a65271ba200694499df51d94 Mon Sep 17 00:00:00 2001 From: Mladen Dryankov Date: Mon, 22 Mar 2021 11:31:00 +0200 Subject: [PATCH 2/4] Unload web page when the app is in background [#580] --- lib/ui/WebPanel.dart | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/lib/ui/WebPanel.dart b/lib/ui/WebPanel.dart index bac0f347..cb8008b0 100644 --- a/lib/ui/WebPanel.dart +++ b/lib/ui/WebPanel.dart @@ -16,8 +16,10 @@ import 'dart:async'; import 'dart:io'; +import 'package:illinois/service/AppLivecycle.dart'; import 'package:illinois/service/Localization.dart'; import 'package:illinois/service/Analytics.dart'; +import 'package:illinois/service/NotificationService.dart'; import 'package:illinois/ui/widgets/HeaderBar.dart'; import 'package:flutter/material.dart'; import 'package:illinois/utils/Utils.dart'; @@ -47,20 +49,23 @@ class WebPanel extends StatefulWidget implements AnalyticsPageName, AnalyticsPag } } -class _WebPanelState extends State { +class _WebPanelState extends State implements NotificationsListener{ _OnlineStatus _onlineStatus; bool _pageLoaded = false; + bool _isForeground = true; @override void initState() { super.initState(); _checkOnlineStatus(); + NotificationService().subscribe(this, AppLivecycle.notifyStateChanged); } @override void dispose() { super.dispose(); + NotificationService().unsubscribe(this); } @override @@ -83,16 +88,19 @@ class _WebPanelState extends State { List _buildWebView() { List list = List(); - list.add(WebView( - initialUrl: widget.url, - javascriptMode: JavascriptMode.unrestricted, - navigationDelegate: _processNavigation, - onPageFinished: (url) { - setState(() { - _pageLoaded = true; - }); - }, - )); + list.add(Visibility( + visible: _isForeground, + child: WebView( + initialUrl: widget.url, + javascriptMode: JavascriptMode.unrestricted, + navigationDelegate: _processNavigation, + onPageFinished: (url) { + setState(() { + _pageLoaded = true; + }); + }, + ), + )); if (!_pageLoaded) { list.add(Center(child: CircularProgressIndicator())); @@ -150,6 +158,13 @@ class _WebPanelState extends State { titleWidget: Text(widget.title, style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w900, letterSpacing: 1.0),),); } + void onNotification(String name, dynamic param){ + if(name == AppLivecycle.notifyStateChanged) { + setState(() { + _isForeground = (param == AppLifecycleState.resumed); + }); + } + } } enum _OnlineStatus { online, offline } From d39b97a8853a50d5454b884020243ac891453149 Mon Sep 17 00:00:00 2001 From: Mladen Dryankov Date: Mon, 22 Mar 2021 15:08:48 +0200 Subject: [PATCH 3/4] v2.9.22+922 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index e91a1427..b02678dc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Illinois client application. # 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: 2.9.21+921 +version: 2.9.22+922 environment: sdk: ">=2.2.0 <3.0.0" From 9326f3659d13ba22a315bc246536c4daaaf02154 Mon Sep 17 00:00:00 2001 From: Mladen Dryankov Date: Tue, 23 Mar 2021 18:44:30 +0200 Subject: [PATCH 4/4] Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18da677d..cc68e529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +## [2.9.22] - 2021-03-22 +### Fixed - Undo changing permission request buttons to "Continue" [#560](https://github.com/rokwire/safer-illinois-app/issues/560). +- YouTube videos plays when screen locked [#580](https://github.com/rokwire/safer-illinois-app/issues/580). ## [2.9.21] - 2021-03-16 ### Changed