Skip to content

Commit

Permalink
Merge pull request #283 from HelloVolla/dev
Browse files Browse the repository at this point in the history
Fix for colored icons and too much weather API requests
  • Loading branch information
wurzer authored Jan 12, 2025
2 parents 67576c1 + 05d1bac commit 54b5cfb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 5 additions & 2 deletions Springboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ LauncherPage {

PositionSource {
id: src
updateInterval: 1000
updateInterval: 60000
active: true

function roundNumber(num, dec) {
Expand All @@ -859,11 +859,14 @@ LauncherPage {
var coord = src.position.coordinate
var newLongitude = roundNumber(coord.longitude, 3)
var newLatitude = roundNumber(coord.latitude, 3)
if ((coord.isValid && (weatherWidget.longitude !== newLongitude || weatherWidget.latitude !== newLatitude))
if ((coord.isValid && (Math.abs(mainView.longitude - newLongitude) >= 0.10 || Math.abs(mainView.latitude
- newLatitude) >= 0.10))
|| (!coord.isValid && dayTemperatures.text.length === 0)) {
console.debug("Widget | Will update weather")
//console.debug("Widget | isValid: " + coord.isValid)
//console.debug("Widget | new ccord: " + coord.longitude + ", " + coord.latitude)
mainView.latitude = coord.latitude;
mainView.longitude = coord.longitude;
console.debug("Widget | new ccord: " + newLongitude + ", " + newLatitude)
console.debug("Widget | old ccord: " + weatherWidget.longitude + ", " + weatherWidget.latitude)
if (!isNaN(newLongitude)) weatherWidget.longitude = newLongitude
Expand Down
2 changes: 1 addition & 1 deletion android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="com.volla.launcher" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="3.0.6" android:versionCode="405" android:installLocation="auto">
<manifest package="com.volla.launcher" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="3.0.7" android:versionCode="407" android:installLocation="auto">
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="29"/>

<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Expand Down
10 changes: 8 additions & 2 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ ApplicationWindow {
property var fontColor: Universal.foreground
property var vibrationDuration: 50
property bool useVibration: settings.useHapticMenus
property bool useColetedIdons: settings.useColoredIcons
property bool useColoredIcons: settings.useColoredIcons
property string city: settings.city
property double longitude: settings.longitude
property double latitude: settings.latitude
property bool isTablet: Screen.desktopAvailableWidth > 520
property int maxTitleLength: 120

Expand Down Expand Up @@ -1198,6 +1201,9 @@ ApplicationWindow {
property bool sttChecked: false
property bool signalIsActivated: false
property bool useColoredIcons: false
property double longitude: 51.1798
property double latitude: 7.1925
property string city: "Remscheid"
property bool showAppsAtStartup: false
property bool useHapticMenus: true
property double blurEffect: 60.0
Expand Down Expand Up @@ -1273,7 +1279,7 @@ ApplicationWindow {
AN.SystemDispatcher.dispatch("volla.launcher.signalEnable", { "enableSignal": signalIsActivated})
}
mainView.useVibration = useHapticMenus
mainView.useColetedIdons = useColoredIcons
mainView.useColoredIcons = useColoredIcons
if (settings.sync) {
settings.sync()
}
Expand Down

0 comments on commit 54b5cfb

Please sign in to comment.