Version 3.0.294

This commit is contained in:
Oliver Hauff 2022-04-25 22:15:15 +02:00
parent d92fb4a40f
commit 8f40f2c208
133 changed files with 17890 additions and 14246 deletions

View file

@ -17,7 +17,7 @@
<!-- Add more resources here -->
<ResourceDictionary.MergedDictionaries>
<!-- Add more resource dictionaries here -->
<themes:ShareeBike/>
<themes:LastenradBayern/>
<!-- Add more resource dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Add more resources here -->

View file

@ -17,10 +17,9 @@ namespace TINK.View.Bike
}
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
{
return item is TINK.ViewModel.Bikes.Bike.BluetoothLock.BikeViewModel
? iLockIBike
: bCBike;
}
=> item is TINK.ViewModel.Bikes.Bike.BluetoothLock.BikeViewModel ||
item is TINK.ViewModel.Bikes.Bike.CopriLock.BikeViewModel
? iLockIBike
: bCBike;
}
}

View file

@ -79,6 +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();
isInitializationStarted = false;
return;
}
@ -112,6 +113,7 @@ namespace TINK.View.BikesAtStation
{
Log.ForContext<BikesAtStationPage>().Error("Displaying bikes at station page failed. {Exception}", exception);
await DisplayAlert("Fehler", $"Seite Räder an Station kann nicht angezeigt werden. ${exception.Message}", "OK");
isInitializationStarted = false;
return;
}
@ -126,6 +128,7 @@ namespace TINK.View.BikesAtStation
BikesAtStationListView.ItemsSource = m_oViewModel;
await m_oViewModel.OnAppearing();
isInitializationStarted = false;
}
/// <summary>

View file

@ -9,7 +9,6 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.Map
{
using Serilog;
using TINK.Model;
using TINK.ViewModel.Map;
[XamlCompilation(XamlCompilationOptions.Compile)]
@ -153,6 +152,7 @@ namespace TINK.View.Map
catch (Exception exception)
{
Log.ForContext<MapPage>().Error("Constructing map page view model failed. {Exception}", exception);
isInitializationStarted = false;
return;
}
@ -167,6 +167,7 @@ namespace TINK.View.Map
catch (Exception exception)
{
Log.ForContext<MapPage>().Error("Setting binding/ navigaton on map page failed. {Exception}", exception);
isInitializationStarted = false;
return;
}
@ -188,6 +189,7 @@ namespace TINK.View.Map
{
// Continue because styling is not essential.
Log.ForContext<MapPage>().Error("Invoking OnAppearing of base failed. {Exception}", exception);
isInitializationStarted = false;
return;
}
@ -206,10 +208,13 @@ namespace TINK.View.Map
{
Log.ForContext<MapPage>().Verbose("Invoking OnAppearing on map page view model.");
await MapPageViewModel.OnAppearing();
isInitializationStarted = false;
}
catch (Exception exception)
{
Log.ForContext<MapPage>().Error("Invoking OnAppearing on map page view model failed. {Exception}", exception);
isInitializationStarted = false;
return;
}
}

View file

@ -40,13 +40,14 @@ namespace TINK.View.MyBikes
{
// Don't repeat the initialization if it has been completed already.
if (isInitializationStarted) return;
isInitializationStarted = true;
isInitializationStarted = true;
if (m_oViewModel != null)
{
// 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();
isInitializationStarted = false;
return;
}
@ -80,8 +81,8 @@ namespace TINK.View.MyBikes
{
Log.ForContext<MyBikesPage>().Error("Displaying bikes at station page failed. {Exception}", exception);
await DisplayAlert("Fehler", $"Seite Räder an Station kann nicht angezeigt werden. ${exception.Message}", "OK");
isInitializationStarted = false;
return;
}
InitializeComponent();
@ -90,6 +91,7 @@ namespace TINK.View.MyBikes
MyBikesListView.ItemsSource = m_oViewModel;
await m_oViewModel.OnAppearing();
isInitializationStarted = false;
}
/// <summary>