mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-11 07:52:50 -05:00
use Paths.strip helper everywhere for consistency sake
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtCore
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
import qs.Common
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property string baseDir: {
|
||||
var path = StandardPaths.writableLocation(StandardPaths.GenericStateLocation) + "/DankMaterialShell"
|
||||
if (path.startsWith("file://")) {
|
||||
return path.substring(7)
|
||||
}
|
||||
return path
|
||||
}
|
||||
readonly property string baseDir: Paths.strip(StandardPaths.writableLocation(StandardPaths.GenericStateLocation) + "/DankMaterialShell")
|
||||
readonly property string filesDir: baseDir + "/notepad-files"
|
||||
readonly property string metadataPath: baseDir + "/notepad-session.json"
|
||||
|
||||
|
||||
@@ -362,10 +362,7 @@ Singleton {
|
||||
if (!image) {
|
||||
return ""
|
||||
}
|
||||
if (image.startsWith("file://")) {
|
||||
return image.substring(7)
|
||||
}
|
||||
return image
|
||||
return Paths.strip(image)
|
||||
}
|
||||
readonly property int urgency: notification.urgency
|
||||
readonly property list<NotificationAction> actions: notification.actions
|
||||
|
||||
Reference in New Issue
Block a user