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

@ -27,35 +27,47 @@
<!--Grid for Bike(s) view and Running process in same row-->
<Grid>
<Frame
Grid.Row="0">
<StackLayout Grid.Row="0">
<!--Bike(s) view-->
<Grid
<!--No Network Connection-->
<sharedGui:NotConnectedToNetView/>
<Frame>
<!--Bike(s) view-->
<Grid
RowDefinitions="1*,32">
<!--Bike(s)-->
<ListView
Grid.Row="0"
<!--Bike(s)-->
<StackLayout
Spacing="0"
IsVisible="{Binding IsBikesListVisible}"
Orientation="Vertical">
<!--Hint for Outdated Data.-->
<sharedGui:HintForRefreshingPageView/>
<ListView
x:Name="MyBikesListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"
IsPullToRefreshEnabled="True"
RefreshCommand="{Binding RefreshCommand}"
IsRefreshing="{Binding IsRefreshing}"/>
<!--No Bikes-->
<Label
</StackLayout>
<!--No Bikes-->
<Label
Grid.Row="0"
IsVisible="{Binding IsNoBikesOccupiedVisible}"
Text="{Binding NoBikesOccupiedText}"/>
<!--Info text-->
<Label
<!--Info text-->
<Label
Grid.Row="1"
Text="{Binding StatusInfoText}"
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
@ -63,9 +75,11 @@
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
</Grid>
</Grid>
</Frame>
</Frame>
</StackLayout>
<!--While process is running-->
<sharedGui:RunningProcessView

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
}
}
}