Queries that return LiveData, are working asynchronously, so weahterDao.getLocation().value statement in the repository is always returning null. That's why isFetchCurrentNeeded is never triggered. In order to fix this bug, declare lastWeatherLocation as a nullable property of ForecastRepositoryImpl and set it when downloadedCurrentWeather has changed.
Queries that return LiveData, are working asynchronously, so weahterDao.getLocation().value statement in the repository is always returning null. That's why isFetchCurrentNeeded is never triggered. In order to fix this bug, declare lastWeatherLocation as a nullable property of ForecastRepositoryImpl and set it when downloadedCurrentWeather has changed.