Opravit zobrazení objednání
This commit is contained in:
parent
82f2197a28
commit
973d4b43a5
3 changed files with 7 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
|||
## 0.1.0-alpha.15
|
||||
- Opravit zobrazení zda-li jde jídlo objednat, když není objednané žádné jídlo
|
||||
## 0.1.0-alpha.15
|
||||
- Úprava nakládání s chybami v `_getRequest`
|
||||
- `fail` je chyba
|
||||
## 0.1.0-alpha.14
|
||||
|
|
|
@ -278,8 +278,9 @@ class Canteen {
|
|||
.toString()
|
||||
.replaceAll(RegExp(r'( )+|([^>a-z]\n)'), '');
|
||||
var objednano = o.contains("Máte objednáno");
|
||||
var lzeObjednat =
|
||||
!(o.contains("nelze zrušit") || o.contains("nelze objednat"));
|
||||
var lzeObjednat = !(o.contains("nelze zrušit") ||
|
||||
o.contains("nelze objednat") ||
|
||||
o.contains("nelze změnit"));
|
||||
var cenaMatch =
|
||||
RegExp(r'(?<=Cena objednaného jídla">).+?(?=&)').firstMatch(o);
|
||||
cenaMatch ??=
|
||||
|
@ -463,7 +464,7 @@ class Canteen {
|
|||
Future<bool> objednatZBurzy(Burza b) async {
|
||||
if (!prihlasen) return Future.error("Uživatel není přihlášen");
|
||||
try {
|
||||
await _getRequest("/faces/secured/" + b.url!); // TODO: SPRAVIT
|
||||
await _getRequest("/faces/secured/" + b.url!);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: canteenlib
|
||||
description: Library for communication with the czech canteen food ordering system iCanteen
|
||||
version: 0.1.0-alpha.15
|
||||
version: 0.1.0-alpha.16
|
||||
repository: 'https://github.com/hernikplays/canteenlib'
|
||||
issue_tracker: 'https://github.com/hernikplays/canteenlib/issues'
|
||||
documentation: 'https://docs.hernikplays.cz'
|
||||
|
|
Reference in a new issue