Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Nov 3, 2023
2 parents 883bfff + 5f5735f commit e3ba386
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
draft: false
prerelease: false
title: "Latest Release"
automatic_release_tag: "v5.0.137"
automatic_release_tag: "v5.0.138"
files: |
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash
Expand Down
158 changes: 156 additions & 2 deletions assets/images/com.invoiceninja.InvoiceNinja.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
</screenshots>
<content_rating type="oars-1.1"/>
<releases>
<release version="5.0.138" date="2023-11-03"/>
<release version="5.0.137" date="2023-11-02"/>
<release version="5.0.136" date="2023-11-01"/>
</releases>
Expand Down
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Constants {
}

// TODO remove version once #46609 is fixed
const String kClientVersion = '5.0.137';
const String kClientVersion = '5.0.138';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand Down
8 changes: 4 additions & 4 deletions lib/data/web_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ class WebClient {
);
client.close();

_checkResponse(url, response);

if (rawResponse) {
return response;
}

_checkResponse(url, response);

final dynamic jsonResponse = json.decode(response.body);

//debugPrint(response.body, wrapWidth: 1000);
Expand Down Expand Up @@ -113,12 +113,12 @@ class WebClient {
client.close();
}

_checkResponse(url, response);

if (rawResponse) {
return response;
}

_checkResponse(url, response);

return json.decode(response.body);
}

Expand Down
13 changes: 0 additions & 13 deletions lib/ui/client/client_pdf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,6 @@ class _ClientPdfViewState extends State<ClientPdfView> {
rawResponse: true,
);

if (response!.statusCode >= 400) {
String errorMessage =
'${response.statusCode}: ${response.reasonPhrase}\n\n';

try {
errorMessage += jsonDecode(response.body)['message'];
} catch (error) {
errorMessage += response.body;
}

throw errorMessage;
}

return response;
}

Expand Down
13 changes: 0 additions & 13 deletions lib/ui/invoice/invoice_pdf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,5 @@ Future<Response?> _loadPDF(
response = await WebClient().get(url, '', rawResponse: true);
}

if (response!.statusCode >= 400) {
String errorMessage =
'${response.statusCode}: ${response.reasonPhrase}\n\n';

try {
errorMessage += jsonDecode(response.body)['message'];
} catch (error) {
errorMessage += response.body;
}

throw errorMessage;
}

return response;
}
8 changes: 1 addition & 7 deletions lib/utils/designs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@ void loadDesign({
webClient
.post(url, credentials.token, data: json.encode(data), rawResponse: true)
.then((dynamic response) {
if ((response as Response).statusCode >= 400) {
showErrorDialog(
message: '${response.statusCode}: ${response.reasonPhrase}');
onComplete(null);
} else {
onComplete(response);
}
onComplete(response);
}).catchError((dynamic error) {
showErrorDialog(message: '$error');
onComplete(null);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.foss.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.137+137
version: 5.0.138+138
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.137+137
version: 5.0.138+138
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: invoiceninja
version: '5.0.137'
version: '5.0.138'
summary: Create invoices, accept payments, track expenses & time tasks
description: "### Note: if the app fails to run using `snap run invoiceninja` it may help to run `/snap/invoiceninja/current/bin/invoiceninja` instead
Expand Down

0 comments on commit e3ba386

Please sign in to comment.