Skip to content

Commit f8ab5f1

Browse files
committed
Merge branch 'develop'
2 parents efb83a5 + 0b3c1e8 commit f8ab5f1

File tree

9 files changed

+42
-14
lines changed

9 files changed

+42
-14
lines changed

.github/workflows/flatpak.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
draft: false
8787
prerelease: false
8888
title: "Latest Release"
89-
automatic_release_tag: "v5.0.144"
89+
automatic_release_tag: "v5.0.145"
9090
files: |
9191
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
9292
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash

flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
</screenshots>
5151
<content_rating type="oars-1.1"/>
5252
<releases>
53+
<release version="5.0.145" date="2023-12-03"/>
5354
<release version="5.0.144" date="2023-12-01"/>
5455
<release version="5.0.143" date="2023-11-30"/>
5556
<release version="5.0.142" date="2023-11-28"/>

lib/constants.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Constants {
44
}
55

66
// TODO remove version once #46609 is fixed
7-
const String kClientVersion = '5.0.144';
7+
const String kClientVersion = '5.0.145';
88
const String kMinServerVersion = '5.0.4';
99

1010
const String kAppName = 'Invoice Ninja';
@@ -487,6 +487,7 @@ const String kGatewayStripe = 'd14dd26a37cecc30fdd65700bfb55b23';
487487
const String kGatewayStripeConnect = 'd14dd26a47cecc30fdd65700bfb67b34';
488488
const String kGatewayAuthorizeNet = '3b6621f970ab18887c4f6dca78d3f8bb';
489489
const String kGatewayCheckoutCom = '3758e7f7c6f4cecf0f4f348b9a00f456';
490+
const String kGatewayPayPalREST = '80af24a6a691230bbec33e930ab40665';
490491
const String kGatewayPayPalExpress = '38f2c48af60c7dd69e04248cbb24c36e';
491492
const String kGatewayPayPalPlatform = '80af24a6a691230bbec33e930ab40666';
492493
const String kGatewayWePay = '8fdeed552015b3c7b44ed6c8ebd9e992';

lib/redux/static/static_selectors.dart

+31-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Package imports:
22
import 'package:built_collection/built_collection.dart';
3+
import 'package:invoiceninja_flutter/constants.dart';
34
import 'package:memoize/memoize.dart';
45

56
// Project imports:
@@ -127,13 +128,36 @@ List<String?> sizeList(BuiltMap<String, SizeEntity> sizeMap) {
127128
return list;
128129
}
129130

130-
var memoizedGatewayList = memo1(
131-
(BuiltMap<String, GatewayEntity> gatewayMap) => gatewayList(gatewayMap));
132-
133-
List<String?> gatewayList(BuiltMap<String, GatewayEntity> gatewayMap) {
134-
final list = gatewayMap.keys
135-
.where((gatewayId) => gatewayMap[gatewayId]!.isVisible)
136-
.toList();
131+
var memoizedGatewayList = memo2(
132+
(BuiltMap<String, GatewayEntity> gatewayMap, bool isHosted) =>
133+
gatewayList(gatewayMap, isHosted));
134+
135+
List<String?> gatewayList(
136+
BuiltMap<String, GatewayEntity> gatewayMap, bool isHosted) {
137+
final list = gatewayMap.keys.where((gatewayId) {
138+
final gateway = gatewayMap[gatewayId]!;
139+
140+
if (!gateway.isVisible) {
141+
return false;
142+
}
143+
144+
if (isHosted) {
145+
if ([
146+
kGatewayPayPalExpress,
147+
kGatewayPayPalREST,
148+
].contains(gateway.id)) {
149+
return false;
150+
}
151+
} else {
152+
if ([
153+
kGatewayPayPalPlatform,
154+
].contains(gateway.id)) {
155+
return false;
156+
}
157+
}
158+
159+
return true;
160+
}).toList();
137161

138162
list.sort((idA, idB) =>
139163
gatewayMap[idA]!.sortOrder.compareTo(gatewayMap[idB]!.sortOrder));

lib/ui/company_gateway/edit/company_gateway_edit.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
152152
EntityDropdown(
153153
autofocus: true,
154154
entityType: EntityType.gateway,
155-
entityList:
156-
memoizedGatewayList(state.staticState.gatewayMap),
155+
entityList: memoizedGatewayList(
156+
state.staticState.gatewayMap, state.isHosted),
157157
labelText: localization.provider,
158158
entityId: companyGateway.gatewayId,
159159
onSelected: (SelectableEntity? gateway) {

lib/utils/i18n.dart

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
1818
static final Map<String, Map<String, String>> _localizedValues = {
1919
'en': {
2020
// STARTER: lang key - do not remove comment
21+
'payment_type_credit': 'Payment Type Credit',
22+
'payment_type_debit': 'Payment Type Debit',
2123
'send_emails_to': 'Send Emails To',
2224
'primary_contact': 'Primary Contact',
2325
'all_contacts': 'All Contacts',

pubspec.foss.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: invoiceninja_flutter
22
description: Client for Invoice Ninja
3-
version: 5.0.144+144
3+
version: 5.0.145+145
44
homepage: https://invoiceninja.com
55
documentation: https://invoiceninja.github.io
66
publish_to: none

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: invoiceninja_flutter
22
description: Client for Invoice Ninja
3-
version: 5.0.144+144
3+
version: 5.0.145+145
44
homepage: https://invoiceninja.com
55
documentation: https://invoiceninja.github.io
66
publish_to: none

snap/snapcraft.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: invoiceninja
2-
version: '5.0.144'
2+
version: '5.0.145'
33
summary: Create invoices, accept payments, track expenses & time tasks
44
description: "### Note: if the app fails to run using `snap run invoiceninja` it may help to run `/snap/invoiceninja/current/bin/invoiceninja` instead
55

0 commit comments

Comments
 (0)