Bug fixes
This commit is contained in:
parent
57281d6915
commit
06218d6fab
|
|
@ -29,8 +29,8 @@ android {
|
||||||
applicationId "com.invoiceninja.flutter"
|
applicationId "com.invoiceninja.flutter"
|
||||||
minSdkVersion 18
|
minSdkVersion 18
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode 33
|
versionCode 34
|
||||||
versionName "0.1.33"
|
versionName "0.1.34"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.1.33</string>
|
<string>0.1.34</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>33</string>
|
<string>34</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// This version must be updated in tandem with the pubspec version.
|
// This version must be updated in tandem with the pubspec version.
|
||||||
const String kAppVersion = '0.1.33';
|
const String kAppVersion = '0.1.34';
|
||||||
const String kAppUrl = 'https://app.invoiceninja.com';
|
const String kAppUrl = 'https://app.invoiceninja.com';
|
||||||
|
|
||||||
const String kAppleStoreUrl =
|
const String kAppleStoreUrl =
|
||||||
|
|
|
||||||
|
|
@ -407,8 +407,10 @@ abstract class InvoiceEntity extends Object
|
||||||
actions.add(EntityAction.viewInvoice);
|
actions.add(EntityAction.viewInvoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (invitations.isNotEmpty) {
|
||||||
actions.add(EntityAction.pdf);
|
actions.add(EntityAction.pdf);
|
||||||
actions.add(EntityAction.clientPortal);
|
actions.add(EntityAction.clientPortal);
|
||||||
|
}
|
||||||
|
|
||||||
if (actions.isNotEmpty) {
|
if (actions.isNotEmpty) {
|
||||||
actions.add(null);
|
actions.add(null);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ abstract class TaskTime implements Built<TaskTime, TaskTimeBuilder> {
|
||||||
|
|
||||||
Map<String, Duration> getParts(int timezoneOffset) {
|
Map<String, Duration> getParts(int timezoneOffset) {
|
||||||
final localStartDate = startDate.toLocal();
|
final localStartDate = startDate.toLocal();
|
||||||
final localEndDate = endDate.toLocal();
|
final localEndDate = (endDate ?? DateTime.now()).toLocal();
|
||||||
final startSqlDate = convertDateTimeToSqlDate(localStartDate);
|
final startSqlDate = convertDateTimeToSqlDate(localStartDate);
|
||||||
final endSqlDate = convertDateTimeToSqlDate(localEndDate);
|
final endSqlDate = convertDateTimeToSqlDate(localEndDate);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,10 @@ InvoiceState _archiveInvoiceFailure(InvoiceState invoiceState,
|
||||||
|
|
||||||
InvoiceState _deleteInvoiceRequest(InvoiceState invoiceState,
|
InvoiceState _deleteInvoiceRequest(InvoiceState invoiceState,
|
||||||
DeleteInvoiceRequest action) {
|
DeleteInvoiceRequest action) {
|
||||||
|
if (!invoiceState.map.containsKey(action.invoiceId)) {
|
||||||
|
return invoiceState;
|
||||||
|
}
|
||||||
|
|
||||||
final invoice = invoiceState.map[action.invoiceId].rebuild((b) =>
|
final invoice = invoiceState.map[action.invoiceId].rebuild((b) =>
|
||||||
b
|
b
|
||||||
..archivedAt = DateTime
|
..archivedAt = DateTime
|
||||||
|
|
@ -227,6 +231,10 @@ InvoiceState _deleteInvoiceRequest(InvoiceState invoiceState,
|
||||||
|
|
||||||
InvoiceState _deleteInvoiceSuccess(InvoiceState invoiceState,
|
InvoiceState _deleteInvoiceSuccess(InvoiceState invoiceState,
|
||||||
DeleteInvoiceSuccess action) {
|
DeleteInvoiceSuccess action) {
|
||||||
|
if (!invoiceState.map.containsKey(action.invoice.id)) {
|
||||||
|
return invoiceState;
|
||||||
|
}
|
||||||
|
|
||||||
return invoiceState
|
return invoiceState
|
||||||
.rebuild((b) => b..map[action.invoice.id] = action.invoice);
|
.rebuild((b) => b..map[action.invoice.id] = action.invoice);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ Middleware<AppState> _showEmailQuote() {
|
||||||
final emailWasSent =
|
final emailWasSent =
|
||||||
await Navigator.of(action.context).pushNamed(QuoteEmailScreen.route);
|
await Navigator.of(action.context).pushNamed(QuoteEmailScreen.route);
|
||||||
|
|
||||||
if (action.completer != null && emailWasSent) {
|
if (action.completer != null && emailWasSent != null && emailWasSent) {
|
||||||
action.completer.complete(null);
|
action.completer.complete(null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,10 @@ QuoteState _archiveQuoteFailure(
|
||||||
|
|
||||||
QuoteState _deleteQuoteRequest(
|
QuoteState _deleteQuoteRequest(
|
||||||
QuoteState quoteState, DeleteQuoteRequest action) {
|
QuoteState quoteState, DeleteQuoteRequest action) {
|
||||||
|
if (!quoteState.map.containsKey(action.quoteId)) {
|
||||||
|
return quoteState;
|
||||||
|
}
|
||||||
|
|
||||||
final quote = quoteState.map[action.quoteId].rebuild((b) => b
|
final quote = quoteState.map[action.quoteId].rebuild((b) => b
|
||||||
..archivedAt = DateTime.now().millisecondsSinceEpoch
|
..archivedAt = DateTime.now().millisecondsSinceEpoch
|
||||||
..isDeleted = true);
|
..isDeleted = true);
|
||||||
|
|
@ -200,6 +204,10 @@ QuoteState _deleteQuoteRequest(
|
||||||
|
|
||||||
QuoteState _deleteQuoteSuccess(
|
QuoteState _deleteQuoteSuccess(
|
||||||
QuoteState quoteState, DeleteQuoteSuccess action) {
|
QuoteState quoteState, DeleteQuoteSuccess action) {
|
||||||
|
if (!quoteState.map.containsKey(action.quote.id)) {
|
||||||
|
return quoteState;
|
||||||
|
}
|
||||||
|
|
||||||
return quoteState.rebuild((b) => b..map[action.quote.id] = action.quote);
|
return quoteState.rebuild((b) => b..map[action.quote.id] = action.quote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,8 +238,7 @@ QuoteState _convertQuoteSuccess(
|
||||||
QuoteState quoteState, ConvertQuoteSuccess action) {
|
QuoteState quoteState, ConvertQuoteSuccess action) {
|
||||||
final quote = action.quote.rebuild((b) => b
|
final quote = action.quote.rebuild((b) => b
|
||||||
..quoteInvoiceId = action.invoice.id
|
..quoteInvoiceId = action.invoice.id
|
||||||
..invoiceStatusId = kInvoiceStatusApproved
|
..invoiceStatusId = kInvoiceStatusApproved);
|
||||||
);
|
|
||||||
return quoteState.rebuild((b) => b..map[action.quote.id] = quote);
|
return quoteState.rebuild((b) => b..map[action.quote.id] = quote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class _TimePickerState extends State<TimePicker> {
|
||||||
_textController.text = formatDate(dateTime.toIso8601String(), context,
|
_textController.text = formatDate(dateTime.toIso8601String(), context,
|
||||||
showTime: true, showDate: false);
|
showTime: true, showDate: false);
|
||||||
|
|
||||||
widget.onSelected(dateTime);
|
widget.onSelected(dateTime.toLocal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,18 @@ class SettingsListVM {
|
||||||
autoStartTasks: store.state.uiState.autoStartTasks,
|
autoStartTasks: store.state.uiState.autoStartTasks,
|
||||||
enableDarkMode: store.state.uiState.enableDarkMode,
|
enableDarkMode: store.state.uiState.enableDarkMode,
|
||||||
requireAuthentication: store.state.uiState.requireAuthentication,
|
requireAuthentication: store.state.uiState.requireAuthentication,
|
||||||
authenticationSupported: LocalAuthentication().canCheckBiometrics,
|
//authenticationSupported: LocalAuthentication().canCheckBiometrics,
|
||||||
|
// TODO remove this once issue is resolved:
|
||||||
|
// https://github.com/flutter/flutter/issues/24339
|
||||||
|
authenticationSupported: Future<bool>(() async {
|
||||||
|
bool enable = false;
|
||||||
|
try {
|
||||||
|
enable = await LocalAuthentication().canCheckBiometrics;
|
||||||
|
} catch (e) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
return enable;
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,10 +113,10 @@ class TimeEditDetailsState extends State<TimeEditDetails> {
|
||||||
final endDate = taskTime.endDate;
|
final endDate = taskTime.endDate;
|
||||||
|
|
||||||
_date = startDate.toIso8601String();
|
_date = startDate.toIso8601String();
|
||||||
_startDate = startDate;
|
_startDate = startDate.toLocal();
|
||||||
|
|
||||||
if (endDate != null) {
|
if (endDate != null) {
|
||||||
_endDate = endDate;
|
_endDate = endDate.toLocal();
|
||||||
_durationController.text = formatDuration(taskTime.duration);
|
_durationController.text = formatDuration(taskTime.duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: invoiceninja_flutter
|
name: invoiceninja_flutter
|
||||||
description: Mobile app for Invoice Ninja
|
description: Mobile app for Invoice Ninja
|
||||||
version: 0.1.33
|
version: 0.1.34
|
||||||
author: Hillel Coren
|
author: Hillel Coren
|
||||||
homepage: https://www.invoiceninja.com
|
homepage: https://www.invoiceninja.com
|
||||||
documentation: http://docs.invoiceninja.com
|
documentation: http://docs.invoiceninja.com
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue