fix: aktualizace, změna odkazů a bug fixy
Změněn odkaz na zpětnou vazbu na nový formulář, přidáno tlačítko na zanechání recenze, aktualizována knihovna canteenlib, opravena chyba s vytvářením notifikací
This commit is contained in:
parent
28cddffe10
commit
403aa5f619
9 changed files with 49 additions and 15 deletions
|
@ -1,3 +1,8 @@
|
|||
# 1.4.1
|
||||
- aktualizovat knihovnu canteenlib
|
||||
- změnit odkaz na odeslání zpětné vazby
|
||||
- přidat odkaz na hodnocení v obchodu s aplikacemi
|
||||
- opravit chybu s vytvářením notifikace
|
||||
# 1.4.0
|
||||
- Opravit chybu, kdy po stisknutí tlačítka zpět na hlavní stránce byl uživatel vrácen na přihlašovací obrazovku
|
||||
- Přidat výběr z instancí (aktuálně pouze SŠTE Olomoucká)
|
||||
|
|
|
@ -81,6 +81,8 @@ abstract class Languages {
|
|||
|
||||
String get reportBugs;
|
||||
|
||||
String get review;
|
||||
|
||||
String get about;
|
||||
|
||||
String get menu;
|
||||
|
|
|
@ -122,7 +122,7 @@ class LanguageCz extends Languages {
|
|||
String get rememberMe => "Zapamatovat si mě";
|
||||
|
||||
@override
|
||||
String get reportBugs => "Nahlásit chybu";
|
||||
String get reportBugs => "Zpětná vazba";
|
||||
|
||||
@override
|
||||
String get saturday => "Sobota";
|
||||
|
@ -234,4 +234,7 @@ class LanguageCz extends Languages {
|
|||
|
||||
@override
|
||||
String get source => "Zdrojový kód";
|
||||
|
||||
@override
|
||||
String get review => "Ohodnotit aplikaci";
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ class LanguageEn extends Languages {
|
|||
String get rememberMe => "Remember me";
|
||||
|
||||
@override
|
||||
String get reportBugs => "Report bug";
|
||||
String get reportBugs => "Feedback";
|
||||
|
||||
@override
|
||||
String get saturday => "Saturday";
|
||||
|
@ -232,4 +232,7 @@ class LanguageEn extends Languages {
|
|||
|
||||
@override
|
||||
String get source => "Source code";
|
||||
|
||||
@override
|
||||
String get review => "Review the app";
|
||||
}
|
||||
|
|
|
@ -69,7 +69,10 @@ void oznamitPredem(SharedPreferences prefs, tz.Location l) async {
|
|||
(element) => element.objednano); // získá objednané jídlo
|
||||
var kdy = DateTime.parse(prefs.getString(
|
||||
"oznameni_cas")!); // uložíme čas, kdy se má odeslat oznámení
|
||||
|
||||
var cas = casNaDate(
|
||||
TimeOfDay(hour: kdy.hour, minute: kdy.minute),
|
||||
);
|
||||
if (cas.isBefore(DateTime.now())) return;
|
||||
// data o oznámení
|
||||
const AndroidNotificationDetails androidSpec =
|
||||
AndroidNotificationDetails('predobedem', 'Oznámení před obědem',
|
||||
|
@ -85,11 +88,7 @@ void oznamitPredem(SharedPreferences prefs, tz.Location l) async {
|
|||
0,
|
||||
title,
|
||||
"${jidlo.varianta} - ${jidlo.nazev}",
|
||||
tz.TZDateTime.from(
|
||||
casNaDate(
|
||||
TimeOfDay(hour: kdy.hour, minute: kdy.minute),
|
||||
),
|
||||
l),
|
||||
tz.TZDateTime.from(cas, l),
|
||||
const NotificationDetails(android: androidSpec, iOS: iOSpec),
|
||||
androidAllowWhileIdle: true,
|
||||
uiLocalNotificationDateInterpretation:
|
||||
|
|
|
@ -342,9 +342,18 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
|||
],
|
||||
),
|
||||
);
|
||||
} else if (value == Languages.of(context)!.review) {
|
||||
(Platform.isAndroid)
|
||||
? launchUrl(
|
||||
Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||
mode: LaunchMode.externalApplication)
|
||||
: launchUrl(
|
||||
Uri.parse(
|
||||
"https://apps.apple.com/cs/app/opencanteen/id1621124445"),
|
||||
mode: LaunchMode.externalApplication);
|
||||
} else if (value == Languages.of(context)!.reportBugs) {
|
||||
launchUrl(Uri.parse(
|
||||
"https://github.com/hernikplays/opencanteen/issues/new/choose"));
|
||||
launchUrl(Uri.parse("https://forms.gle/jKN7QeFJwpaApSbC8"),
|
||||
mode: LaunchMode.externalApplication);
|
||||
} else if (value == Languages.of(context)!.about) {
|
||||
var packageInfo = await PackageInfo.fromPlatform();
|
||||
if (!mounted) return;
|
||||
|
@ -434,6 +443,7 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
|||
itemBuilder: (BuildContext context) {
|
||||
return {
|
||||
Languages.of(context)!.reportBugs,
|
||||
Languages.of(context)!.review,
|
||||
Languages.of(context)!.settings,
|
||||
Languages.of(context)!.about,
|
||||
Languages.of(context)!.signOut
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:opencanteen/util.dart';
|
||||
|
@ -81,9 +83,18 @@ class _OfflineJidelnicekState extends State<OfflineJidelnicek> {
|
|||
storage.deleteAll();
|
||||
Navigator.pushReplacement(
|
||||
context, MaterialPageRoute(builder: (c) => const LoginPage()));
|
||||
} else if (value == Languages.of(context)!.review) {
|
||||
(Platform.isAndroid)
|
||||
? launchUrl(
|
||||
Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||
mode: LaunchMode.externalApplication)
|
||||
: launchUrl(
|
||||
Uri.parse(
|
||||
"https://apps.apple.com/cs/app/opencanteen/id1621124445"),
|
||||
mode: LaunchMode.externalApplication);
|
||||
} else if (value == Languages.of(context)!.reportBugs) {
|
||||
launchUrl(Uri.parse(
|
||||
"https://github.com/hernikplays/opencanteen/issues/new/choose"));
|
||||
launchUrl(Uri.parse("https://forms.gle/jKN7QeFJwpaApSbC8"),
|
||||
mode: LaunchMode.externalApplication);
|
||||
} else if (value == Languages.of(context)!.about) {
|
||||
var packageInfo = await PackageInfo.fromPlatform();
|
||||
if (!mounted) return;
|
||||
|
@ -120,6 +131,7 @@ class _OfflineJidelnicekState extends State<OfflineJidelnicek> {
|
|||
itemBuilder: (BuildContext context) {
|
||||
return {
|
||||
Languages.of(context)!.reportBugs,
|
||||
Languages.of(context)!.review,
|
||||
Languages.of(context)!.about,
|
||||
Languages.of(context)!.signOut
|
||||
}.map((String choice) {
|
||||
|
|
|
@ -28,7 +28,7 @@ packages:
|
|||
name: canteenlib
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.0.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -6,7 +6,7 @@ publish_to: 'none'
|
|||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
# followed by an optional build number separated by a +.
|
||||
version: 1.4.0+19
|
||||
version: 1.4.1+20
|
||||
|
||||
environment:
|
||||
sdk: ">=2.16.1 <3.0.0"
|
||||
|
@ -16,7 +16,7 @@ dependencies:
|
|||
sdk: flutter
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
canteenlib: ^1.0.0
|
||||
canteenlib: ^1.0.1
|
||||
flutter_secure_storage: 5.0.2
|
||||
url_launcher: ^6.0.20
|
||||
path_provider: ^2.0.9
|
||||
|
|
Reference in a new issue