Version 3.0.360

This commit is contained in:
Anja 2023-02-22 14:03:35 +01:00
parent 5c0b2e70c9
commit faf68061f4
160 changed files with 2114 additions and 1932 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@ -126,6 +126,8 @@ namespace TINK
Log.Debug("Get auth cookie.");
IStore store = null;
// Version of last version used or null for initial installation.
// Used for updating purposes.
var lastVersion = JsonSettingsDictionary.GetAppVersion(settingsJSON);
if (new Version(3, 0, 290) <= lastVersion)
{
@ -139,9 +141,11 @@ namespace TINK
Barrel.ApplicationId = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
// Get main thread synchronization context to be able to update gui elements from worker threads.
var context = SynchronizationContext.Current;
var appInfoService = DependencyService.Get<IAppInfo>();
var smartDevice = DependencyService.Get<ISmartDevice>();
const string MERCHANTID = "0000000000";
@ -158,13 +162,14 @@ namespace TINK
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
sessionCookie,
mail,
smartDevice,
expiresAfter),
merchantId: MERCHANTID,
bluetoothService: BluetoothService, /* locksService */
locationPermissionsService: PermissionsService,
locationServicesContainer: LocationServicesContainer,
locksService: null,
device: DependencyService.Get<ISmartDevice>(),
device: smartDevice,
specialFolder: specialFolders,
cipher: new Cipher(),
new TINK.Services.ThemeNS.Theme(Application.Current.Resources.MergedDictionaries),

View file

@ -199,8 +199,8 @@
Grid.Row="13"
Grid.ColumnSpan="2"/>
<Label
Text= "{Binding TariffDescription.InfoEntry5}"
IsVisible="{Binding TariffDescription.InfoEntry5, Converter={StaticResource Label_Converter}}"
Text= "{Binding TariffDescription.TrackingInfoText}"
IsVisible="{Binding TariffDescription.TrackingInfoText, Converter={StaticResource Label_Converter}}"
Grid.Row="14"
Grid.ColumnSpan="2"/>
</Grid>

View file

@ -79,7 +79,7 @@ namespace TINK.View.BikesAtStation
// No need to create view model, set binding context an items source if already done.
// If done twice tap events are fired multiple times (when hiding page using home button).
await m_oViewModel.OnAppearing();
await m_oViewModel.OnAppearingOrRefresh();
isInitializationStarted = false;
return;
}
@ -88,9 +88,6 @@ namespace TINK.View.BikesAtStation
{
var model = App.ModelRoot;
// Backup synchronization context when called from GUI-thread.
var synchronizationContext = SynchronizationContext.Current;
m_oViewModel = new BikesAtStationPageViewModel(
model.ActiveUser,
App.PermissionsService,
@ -103,7 +100,7 @@ namespace TINK.View.BikesAtStation
model.LocksServices.Active,
model.Polling,
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url),
(d, obj) => synchronizationContext.Post(d, obj),
model.PostAction,
model.SmartDevice,
this)
{
@ -128,7 +125,7 @@ namespace TINK.View.BikesAtStation
BindingContext = m_oViewModel;
BikesAtStationListView.ItemsSource = m_oViewModel;
await m_oViewModel.OnAppearing();
await m_oViewModel.OnAppearingOrRefresh();
isInitializationStarted = false;
}

View file

@ -35,7 +35,7 @@ namespace TINK.View.FindBike
{
// No need to create view model, set binding context an items source if already done.
// If done twice tap events are fired multiple times (when hiding page using home button).
await m_oViewModel.OnAppearing();
await m_oViewModel.OnAppearingOrRefresh();
return;
}
@ -43,9 +43,6 @@ namespace TINK.View.FindBike
{
var model = App.ModelRoot;
// Backup synchronization context when called from GUI-thread.
var synchronizationContext = SynchronizationContext.Current;
m_oViewModel = new FindBikePageViewModel(
model.ActiveUser,
App.PermissionsService,
@ -57,7 +54,7 @@ namespace TINK.View.FindBike
model.LocksServices.Active,
model.Stations,
model.Polling,
(d, obj) => synchronizationContext.Post(d, obj),
model.PostAction,
model.SmartDevice,
this,
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url))
@ -78,7 +75,7 @@ namespace TINK.View.FindBike
BindingContext = m_oViewModel;
FindBikeListView.ItemsSource = m_oViewModel;
await m_oViewModel.OnAppearing();
await m_oViewModel.OnAppearingOrRefresh();
}
/// <summary>

View file

@ -1,4 +1,4 @@
using Plugin.Connectivity;
using Plugin.Connectivity;
using System;
using System.Threading;
using System.Threading.Tasks;
@ -47,7 +47,7 @@ namespace TINK.View.MyBikes
{
// No need to create view model, set binding context an items source if already done.
// If done twice tap events are fired multiple times (when hiding page using home button).
await m_oViewModel.OnAppearing();
await m_oViewModel.OnAppearingOrRefresh();
isInitializationStarted = false;
return;
}
@ -56,9 +56,6 @@ namespace TINK.View.MyBikes
{
var model = App.ModelRoot;
// Backup synchronization context when called from GUI-thread.
var synchronizationContext = SynchronizationContext.Current;
m_oViewModel = new MyBikesPageViewModel(
model.ActiveUser,
App.PermissionsService,
@ -70,7 +67,7 @@ namespace TINK.View.MyBikes
model.LocksServices.Active,
model.Stations,
model.Polling,
(d, obj) => synchronizationContext.Post(d, obj),
model.PostAction,
model.SmartDevice,
this,
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url))
@ -91,7 +88,7 @@ namespace TINK.View.MyBikes
BindingContext = m_oViewModel;
MyBikesListView.ItemsSource = m_oViewModel;
await m_oViewModel.OnAppearing();
await m_oViewModel.OnAppearingOrRefresh();
isInitializationStarted = false;
}
@ -183,4 +180,4 @@ namespace TINK.View.MyBikes
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery, co2Saving));
#endif
}
}
}