Skip to content

Commit

Permalink
Merge pull request #248 from HelloVolla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
wurzer authored Jul 14, 2024
2 parents 75e05d6 + 8acb564 commit bc769a1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 28 deletions.
12 changes: 6 additions & 6 deletions Collections.qml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ LauncherPage {
// load threads from further source
// address (phone or contact), body (message), date, type
console.debug("Collections | Signal is active: " + mainView.isSignalActive)
if (mainView.isActiveSignal) AN.SystemDispatcher.dispatch("volla.launcher.signalThreadsAction", filter)
if (mainView.isActiveSignal()) AN.SystemDispatcher.dispatch("volla.launcher.signalThreadsAction", filter)
}

function loadCalls(filter) {
Expand Down Expand Up @@ -1277,12 +1277,12 @@ LauncherPage {
var note = {"c_ID": rawNote["id"]}
note.c_STEXT = mainView.parseTime(rawNote.date)
note.c_TSTAMP = rawNote.date
var content = rawNote.content.replace(/$/gim, "\n")
var titleEnd = content.indexOf("\n")
var title = rawNote.content.replace(/($)/gm, "\n")
var titleEnd = title.indexOf("\n")
note.c_TEXT = titleEnd > 0 && titleEnd < mainView.maxTitleLength ?
content.slice(0, titleEnd) : titleEnd > mainView.maxTitleLength ?
content.slice(0, mainView.maxTitleLength) + "..." : content
note.c_CONTENT = content
title.slice(0, titleEnd) : titleEnd > mainView.maxTitleLength ?
title.slice(0, mainView.maxTitleLength) + "..." : title
note.c_CONTENT = rawNote.content
note.c_ICON = ""
note.c_SBADGE = rawNote.pinned
modelArr.push(note)
Expand Down
20 changes: 11 additions & 9 deletions Details.qml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ LauncherPage {
prepareWebArticleView(id)
break
case mainView.detailMode.Note:
prepareNoteView(title)
detailEdit.lastCurserPosition = 0
prepareNoteView(title, 0)
break
default:
console.log("DetailPage | Mode not yet implemented")
Expand Down Expand Up @@ -202,9 +203,9 @@ LauncherPage {
function prepareNoteView(note, curserPosition) {
console.log("Details | Process note " + currentDetailId + " with curser at " + curserPosition)

// console.debug("================")
// var noteArr = note.split("\n")
// for (var l = 0;l < noteArr.length; l++) console.debug("LINE: " + noteArr[l])
console.debug("================")
var noteArr = note.split("\n")
for (var l = 0;l < noteArr.length; l++) console.debug("LINE: " + noteArr[l])

detailEdit.isBlocked = true
detailEdit.textLength = note.length
Expand Down Expand Up @@ -232,10 +233,10 @@ LauncherPage {
styledText = styledText.replace(/^(<p><\/p><p><\/p>$)/gim, '<p>&#8203;</p>')
}

// console.debug("----------------")
// var textArr = styledText.split("\n")
// for (l = 0;l < textArr.length; l++) console.debug("LINE: " + textArr[l])
// console.debug("================")
console.debug("----------------")
var textArr = styledText.split("\n")
for (l = 0;l < textArr.length; l++) console.debug("LINE: " + textArr[l])
console.debug("================")

detailEdit.text = styledText

Expand Down Expand Up @@ -389,9 +390,10 @@ LauncherPage {
if (activeFocus) {
detailFlickable.height = mainView.height * 0.46
} else {
var plainText = detailEdit.getText(0, 10000)
var plainText = detailEdit.getText(0, 10000).replace(/[\u200B-\u200D\uFEFF\u200E\u200F]/g, '').trim()
mainView.updateNote(detailPage.currentDetailId, plainText, detailPage.currentDetailHasBadge)
detailEdit.editMode = false
detailEdit.isBlocked = true
detailFlickable.height = mainView.height
}
}
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.11" android:versionCode="308" android:installLocation="auto">
<manifest package="com.volla.launcher" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.4.13" android:versionCode="310" 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
1 change: 0 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ apply plugin: 'com.android.application'

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation files('libs/smssdk.aar')
implementation 'com.chimbori.crux:crux:2.2.0'
compile 'com.klinkerapps:android-smsmms:5.2.6'
implementation 'androidx.appcompat:appcompat:1.2.0'
Expand Down
17 changes: 6 additions & 11 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ ApplicationWindow {
property string cacheDescription: "Messages cache"
property real cacheVersion: 1.0
property int cacheSize: 1000
property bool isActiveSignal: false

property var defaultFeeds: [{"id" : "https://www.nzz.ch/recent.rss", "name" : "NZZ", "activated" : true, "icon": "https://assets.static-nzz.ch/nzz/app/static/favicon/favicon-128.png?v=3"},
{"id" : "https://www.chip.de/rss/rss_topnews.xml", "name": "Chip Online", "activated" : true, "icon": "https://www.chip.de/fec/assets/favicon/apple-touch-icon.png?v=01"},
Expand Down Expand Up @@ -789,7 +788,7 @@ ApplicationWindow {
note["pinned"] = false
notesArr.push(note)
}
//console.debug("MainView | New JSON: " + JSON.stringify(notesArr))
console.debug("MainView | New JSON: " + JSON.stringify(notesArr))
notesStore.write(JSON.stringify(notesArr))
notes = notesArr
if (mainView.count > mainView.swipeIndex.Collections) {
Expand Down Expand Up @@ -923,8 +922,10 @@ ApplicationWindow {
function checkDefaultApp(apps) {
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.fossiry.calendar" ).length > 0 ?
"org.fossiry.calendar" : "com.simplemobiletools.calendar.pro"
}

function isActiveSignal() {
return settings.signalIsActivated
}

WorkerScript {
Expand Down Expand Up @@ -1108,11 +1109,6 @@ ApplicationWindow {
Component.onCompleted: {
checkCustomParameters()

// console.log("AppWindow | Number of font families: " + Qt.fontFamilies().length)
// for (var i = 0; i < Qt.fontFamilies().length; i++) {
// console.log("AppWindow | FontFamily: " + Qt.fontFamilies()[i])
// }

if (settings.firstStart) {
console.debug("AppWindow | ", "Will start tutorial")
var component = Qt.createComponent("/OnBoarding.qml")
Expand Down Expand Up @@ -1140,9 +1136,8 @@ ApplicationWindow {
if (signalIsActivated) {
AN.SystemDispatcher.dispatch("volla.launcher.signalEnable", { "enableSignal": signalIsActivated})
}
mainView.isActiveSignald = signalIsActivated
mainView.useVibration = useHapticMenus
if (settings.sync) {
settings.sync() if (settings.sync) {
settings.sync()
}
}
Expand Down

0 comments on commit bc769a1

Please sign in to comment.