Skip to content

Commit

Permalink
Merge pull request #582 from rokwire/release/v2.9.22+922
Browse files Browse the repository at this point in the history
Release/v2.9.22+922
  • Loading branch information
yoonlees authored Mar 23, 2021
2 parents b972dd8 + 1d27ad2 commit 02ac668
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 24 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +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
Expand Down
6 changes: 3 additions & 3 deletions assets/strings.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions assets/strings.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions assets/strings.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "跳过共享位置",
Expand All @@ -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": "跳过启用蓝牙",
Expand All @@ -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": "跳过接收通知",
Expand Down
37 changes: 26 additions & 11 deletions lib/ui/WebPanel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -47,20 +49,23 @@ class WebPanel extends StatefulWidget implements AnalyticsPageName, AnalyticsPag
}
}

class _WebPanelState extends State<WebPanel> {
class _WebPanelState extends State<WebPanel> 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
Expand All @@ -83,16 +88,19 @@ class _WebPanelState extends State<WebPanel> {

List<Widget> _buildWebView() {
List<Widget> list = List<Widget>();
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()));
Expand Down Expand Up @@ -150,6 +158,13 @@ class _WebPanelState extends State<WebPanel> {
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 }
2 changes: 1 addition & 1 deletion lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class _OnboardingAuthBluetoothPanelState extends State<OnboardingAuthBluetoothPa
ScalableRoundedButton(
label: Localization().getStringEx(
'panel.onboarding.bluetooth.button.allow.title',
'Continue'),
'Enable Bluetooth'),
hint: Localization().getStringEx(
'panel.onboarding.bluetooth.button.allow.hint',
''),
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/onboarding/OnboardingAuthLocationPanel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class OnboardingAuthLocationPanel extends StatelessWidget with OnboardingPanel {
ScalableRoundedButton(
label: Localization().getStringEx(
'panel.onboarding.location.button.allow.title',
'Continue'),
'Enable Location Services'),
hint: Localization().getStringEx(
'panel.onboarding.location.button.allow.hint',
''),
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/onboarding/OnboardingAuthNotificationsPanel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class OnboardingAuthNotificationsPanel extends StatelessWidget with OnboardingPa
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
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,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 02ac668

Please sign in to comment.