martykan / forecastie

A simple, opensource weather app for Android.
Other
870 stars 337 forks source link

Allow to use a fixed location without forcing activate location services #629

Closed davidmef closed 2 years ago

davidmef commented 2 years ago

The application should allow to set a location once instead of searching for the current location. Currently it show a dialog asking to go to the settings to activate the location. I set the current location using location services and then disabled location services. Since then, whenever I open Forecastie or if, with Forescastie open, I rotate the screen, the application again shows the dialog, which I have to dismiss. Setting a fixed location was an accepted use case until a few versions ago, I think.

ghost commented 2 years ago

Came to say the same. Its rather aggressive with location request message now everytime i open it even with location off on device and unchecked in app settings. Initial location was set by manually typing out city in my case.

robinpaulson commented 2 years ago

The application should allow to set a location once instead of searching for the current location.

This is indeed the better way to do this.

Setting a fixed location was an accepted use case until a few versions ago, I think.

Yes, that sounds like it was the case, I can't recall exactly; it was probably done recently. I wonder if this "regression" was introduced as part of some other, apparently innocuous, change. I'll have a look through the recent commits, see what I can find. It would help if you were both able to do so too.

robinpaulson commented 2 years ago

I think it's this: https://github.com/martykan/forecastie/commit/21e966b629569cb0a7c2cae6be5d1ec7b8d8d0da

It calls the function getCityByLocation() each time the app is launched. It probably does it when the screen is rotated too, for reasons I vaguely remember as being necessary to solve a different bug.....

robinpaulson commented 2 years ago

@initenit, would you be able to take a look at this? I realise you added the call to that function for a good reason, to solve a bug. Unfortunately, the bug it has introduced is more problematic. I may have to revert it, for the reasons listed by davidmef and vexusia, although I'd prefer to not have either bug

ghost commented 2 years ago

Pulled 1.20 from fdroid today and no longer an issue on my end. Figured worth mentioning since case still open.

robinpaulson commented 2 years ago

I reverted a bad commit, which also undid the offending commit triggering this issue

Lee-Carre commented 2 years ago

… calls the function getCityByLocation() each time the app is launched. …, for reasons I vaguely remember as being necessary to solve a different bug

… added the call to that function for a good reason, to solve a bug.

For context (& the curious) the other bug mentioned is, I think, #611 .