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