Skip to content

Commit

Permalink
Merge pull request #268 from HelloVolla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
wurzer authored Nov 10, 2024
2 parents f77b012 + 61ed7bd commit a01c22f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
14 changes: 9 additions & 5 deletions AppGrid.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ LauncherPage {
"org.fossify.musicplayer": "/icons/[email protected]",
"com.volla.messages": "/icons/[email protected]",
"com.contactoffice.mailfence": "/icons/[email protected]",
"com.emclient.mailclient": "/icons/[email protected]",
"be.engie.smart": "/icons/[email protected]",
"be.bmid.itsme": "/icons/[email protected]",
"com.facebook.lite": "/icons/[email protected]",
Expand All @@ -49,7 +50,7 @@ LauncherPage {
"be.ixor.doccle.android": "/icons/[email protected]",
"com.themobilecompany.delijn": "/icons/[email protected]",
"com.x8bit.bitwarden": "/icons/[email protected]",
"com.beeper.chat": "/icons/[email protected]",
"com.beeper.android": "/icons/[email protected]",
"be.argenta.bankieren": "/icons/[email protected]",
"com.android.dialer": "/icons/[email protected]",
"com.android.mms" : "/icons/[email protected]",
Expand Down Expand Up @@ -119,6 +120,7 @@ LauncherPage {
"org.mozilla.fennec_fdroid": qsTr("Browser"),
"com.google.android.gm" : qsTr("Mail"),
"eu.faircode.email" : qsTr("Mail"),
"com.emclient.mailclient" : qsTr("Mail"),
"com.fsck.k9": qsTr("Mail"),
"at.bitfire.davdroid": qsTr("Sync"),
"hideme.android.vpn.noPlayStore": qsTr("VPN"),
Expand Down Expand Up @@ -520,10 +522,12 @@ LauncherPage {
console.debug("AppLauncher | Will read app cache")
var appsArray = JSON.parse(appsString)
var groupedApps = appLauncher.getGroupedApps(appsArray)
appLauncher.appGroups = new Array
appLauncher.destroyAppGroups()
appLauncher.createAppGroups(groupedApps)
// Workaround, if users didn't update the os version
if (!appsString.includes("org.fossify.gallery")) mainView.galleryApp = "com.simplemobiletools.gallery.pro"
// Reflect different OS versions and devices
mainView.checkDefaultApps(appsArray)
//if (!appsString.includes("org.fossify.gallery")) mainView.galleryApp = "com.simplemobiletools.gallery.pro"
//if (!appsString.includes("org.fossify.calendar")) mainView.galleryApp = "com.simplemobiletools.calendar.pro"
} else {
console.log("AppLauncher | Need to retrieve apps from system")
mainView.updateSpinner(true)
Expand Down Expand Up @@ -552,7 +556,7 @@ LauncherPage {
}
}
mainView.updateSpinner(false)
mainView.checkDefaultApps(getAllApps())
mainView.checkDefaultApps(message["apps"])
} else if (type === "volla.launcher.receivedShortcut") {
console.log("AppGrid | New pinned shortcut: " + message["shortcutId"])

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="2.4.21" android:versionCode="317" android:installLocation="auto">
<manifest package="com.volla.launcher" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.4.22" android:versionCode="318" 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
12 changes: 8 additions & 4 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ ApplicationWindow {
property int maxTitleLength: 120

property string galleryApp: "org.fossify.gallery"
property string calendarApp: "com.simplemobiletools.calendar.pro"
property string calendarApp: "org.fossify.calendar"
property string cameraApp: "com.mediatek.camera"
property string phoneApp: "com.android.dialer"
property string notesApp: "org.fossify.notes"
Expand Down Expand Up @@ -919,10 +919,14 @@ ApplicationWindow {
}
}

function checkDefaultApp(apps) {
mainView.galleryApp = apps.filter( el => el.package !== "org.fossify.gallery" ).length > 0 ?
function checkDefaultApps(apps) {
console.debug("MainView | Will check apps")
console.debug(apps.filter( el => el.package === "org.fossify.gallery" ).length)
console.debug(apps.filter( el => el.package === "org.fossify.calendar" ).length)

mainView.galleryApp = apps.filter( el => el.package === "org.fossify.gallery" ).length > 0 ?
"org.fossify.gallery" : "com.simplemobiletools.gallery.pro"
mainView.calendarApp = apps.filter( el => el.package !== "org.fossify.calendar" ).length > 0 ?
mainView.calendarApp = apps.filter( el => el.package === "org.fossify.calendar" ).length > 0 ?
"org.fossify.calendar" : "com.simplemobiletools.calendar.pro"
}

Expand Down

0 comments on commit a01c22f

Please sign in to comment.