Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop' into OT-717_UnreadableStatusBar
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/main.dart
  • Loading branch information
Frank Gregor committed Apr 6, 2020
2 parents 2af2364 + 09ccfe9 commit 57a68af
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:logging/logging.dart';
import 'package:ox_coi/src/brandable/custom_theme.dart';
import 'package:ox_coi/src/error/error_bloc.dart';
import 'package:ox_coi/src/l10n/l10n.dart';
import 'package:ox_coi/src/lifecycle/lifecycle_bloc.dart';
Expand All @@ -59,7 +60,6 @@ import 'package:ox_coi/src/main/splash.dart';
import 'package:ox_coi/src/navigation/navigation.dart';
import 'package:ox_coi/src/push/push_bloc.dart';
import 'package:ox_coi/src/push/push_event_state.dart';
import 'package:ox_coi/src/brandable/custom_theme.dart';
import 'package:ox_coi/src/widgets/view_switcher.dart';

void main() {
Expand Down Expand Up @@ -191,5 +191,4 @@ class _OxCoiState extends State<OxCoi> {
_navigation.popUntilRoot(context);
_mainBloc.add(AppLoaded());
}

}
1 change: 1 addition & 0 deletions lib/src/l10n/l.dart
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ class L {
// Scan the QR code to add an verify user X (e.g. Scan this QR code to create a new contact or verify a contact with alice.)
static final qrScanTextX = _translationKey("Scan this QR code to create a new contact or verify a contact with %s.");
static final qrShow = _translationKey("Show QR");
static final qrShowErrorX = _translationKey("Not possible to create qr code: %s");
static final qrCameraNotAllowed = _translationKey("Camera not ready");
static final qrCameraNotAllowedText = _translationKey("No camera permission granted.");
static final qrNoValidCode = _translationKey("No valid QR code");
Expand Down
2 changes: 1 addition & 1 deletion lib/src/log/log_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class LogManager {

get currentLogFile => _logFile;

void setup({@required bool logToFile, @required Level logLevel}) async {
Future<void> setup({@required bool logToFile, @required Level logLevel}) async {
BlocSupervisor.delegate = LogBlocDelegate();
if (logToFile) {
_logFile = await _setupAndGetLogFile();
Expand Down
1 change: 1 addition & 0 deletions lib/src/notifications/local_notification_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class LocalNotificationManager {
int senderId = await invite.getFromId();
if (!createdNotifications.contains(senderId)) {
createdNotifications.add(senderId);
contactRepository.putIfAbsent(id: senderId);
Contact contact = contactRepository.get(senderId);
var contactName = await contact.getName();
var contactMail = await contact.getAddress();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/platform/system_information.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Future<String> getDeviceName() async {
Future<String> getDeviceOsVersion() async {
await getDeviceInfo();
return Platform.isIOS
? "OS: ${iosInfo.utsname.sysname} - Release: ${iosInfo.utsname.release} - Version: ${iosInfo.utsname.version}"
? "OS: ${iosInfo.systemName} - Version: ${iosInfo.systemVersion} - Kernel: ${iosInfo.utsname.version}"
: "OS: ${androidInfo.version.baseOS} - Release: ${androidInfo.version.release} (${androidInfo.version.codename}) - SDK: ${androidInfo.version.sdkInt}";
}

Expand Down
22 changes: 18 additions & 4 deletions lib/src/qr/show_qr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';
import 'package:ox_coi/src/brandable/custom_theme.dart';
import 'package:ox_coi/src/extensions/string_ui.dart';
import 'package:ox_coi/src/l10n/l.dart';
Expand All @@ -65,10 +66,11 @@ class ShowQr extends StatefulWidget {
}

class _ShowQrState extends State<ShowQr> {
UserBloc _userBloc = UserBloc();
QrBloc _qrBloc = QrBloc();
final _logger = Logger("show_qr");
final UserBloc _userBloc = UserBloc();
final QrBloc _qrBloc = QrBloc();
final Navigation _navigation = Navigation();
String _qrText;
Navigation _navigation = Navigation();

@override
void initState() {
Expand Down Expand Up @@ -140,7 +142,19 @@ class _ShowQrState extends State<ShowQr> {
data: qrText,
size: qrImageSize,
backgroundColor: CustomTheme.of(context).white,
version: 6,
version: 8,
errorStateBuilder: (context, error) {
_logger.info(L10n.getFormatted(L.qrShowErrorX, [error]));
return Container(
child: Center(
child: Text(
L10n.getFormatted(L.qrShowErrorX, [error]),
style: Theme.of(context).textTheme.body2.apply(color: CustomTheme.of(context).error),
textAlign: TextAlign.center,
),
),
);
},
);
}
}

0 comments on commit 57a68af

Please sign in to comment.