File tree Expand file tree Collapse file tree
src/Mobile/eShopOnContainers/eShopOnContainers.Core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,8 +215,10 @@ private void Logout()
215215 if ( Settings . UseMocks )
216216 {
217217 Settings . AuthAccessToken = string . Empty ;
218- Settings . AuthIdToken = string . Empty ;
218+ Settings . AuthIdToken = string . Empty ;
219219 }
220+
221+ Settings . UseFakeLocation = false ;
220222 }
221223
222224 private async Task NavigateAsync ( string url )
Original file line number Diff line number Diff line change @@ -140,6 +140,8 @@ public double Longitude
140140 }
141141 }
142142
143+ public bool UserIsLogged => ! string . IsNullOrEmpty ( Settings . AuthAccessToken ) ;
144+
143145 public ICommand ToggleMockServicesCommand => new Command ( async ( ) => await ToggleMockServicesAsync ( ) ) ;
144146
145147 public ICommand ToggleFakeLocationCommand => new Command ( ( ) => ToggleFakeLocationAsync ( ) ) ;
@@ -194,8 +196,9 @@ private async Task ToggleSendLocationAsync()
194196 Latitude = _latitude ,
195197 Longitude = _longitude
196198 } ;
199+ var authToken = Settings . AuthAccessToken ;
197200
198- await _locationService . UpdateUserLocation ( locationRequest ) ;
201+ await _locationService . UpdateUserLocation ( locationRequest , authToken ) ;
199202 }
200203
201204 private void UpdateInfo ( )
Original file line number Diff line number Diff line change 163163 Grid.ColumnSpan=" 2" />
164164 <StackLayout
165165 Grid.Column=" 0"
166- Grid.Row=" 4" >
166+ Grid.Row=" 4"
167+ IsVisible =" {Binding UserIsLogged}" >
167168 <Label
168169 Text =" {Binding TitleUseFakeLocation}"
169170 TextColor =" {StaticResource GreenColor}"
179180 Animate =" True"
180181 Checked =" {Binding UseFakeLocation, Mode=TwoWay}"
181182 Command =" {Binding ToggleFakeLocationCommand}"
182- Style =" {StaticResource SettingsToggleButtonStyle}" >
183+ Style =" {StaticResource SettingsToggleButtonStyle}"
184+ IsVisible =" {Binding UserIsLogged}" >
183185 <controls : ToggleButton .CheckedImage>
184186 <OnPlatform x : TypeArguments =" ImageSource"
185187 Android =" switch_on.png"
193195 WinPhone =" Assets/switchOff.png" />
194196 </controls : ToggleButton .UnCheckedImage>
195197 </controls : ToggleButton >
196- <!-- ENDPOINT -->
198+ <!-- FAKE LOCATIONS -->
197199 <StackLayout
198200 Grid.Row=" 5"
199201 Grid.Column=" 0"
205207 Style =" {StaticResource HeaderLabelStyle}" />
206208 <Entry
207209 Text =" {Binding Latitude, Mode=TwoWay}"
208- Keyboard =" Numeric " >
210+ Keyboard =" Text " >
209211 <Entry .Style>
210212 <OnPlatform
211213 x : TypeArguments =" Style"
219221 Style =" {StaticResource HeaderLabelStyle}" />
220222 <Entry
221223 Text =" {Binding Longitude, Mode=TwoWay}"
222- Keyboard =" Numeric " >
224+ Keyboard =" Text " >
223225 <Entry .Style>
224226 <OnPlatform
225227 x : TypeArguments =" Style"
You can’t perform that action at this time.
0 commit comments