Commit 9a1d3475 authored by ransome1's avatar ransome1
Browse files

Fixed todo sorting, fixed Windows badge issue

parent 5d87aaef
......@@ -2,15 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key><true/>
<key>com.apple.application-identifier</key>
<string>8QSR3UZXP8.com.todotxt.sleek</string>
<key>com.apple.developer.team-identifier</key>
<string>8QSR3UZXP8</string>
<key>com.apple.security.application-groups</key>
<array>
<string>8QSR3UZXP8.com.todotxt.sleek</string>
</array>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
......@@ -23,5 +16,10 @@
<true/>
<key>com.apple.security.files.bookmarks.document-scope</key>
<true/>
</dict>
</plist>
\ No newline at end of file
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
<string>com.apple.locationd.desktop.registration</string>
<string>com.apple.CoreLocation.agent</string>
</array>
</dict>
</plist>
\ No newline at end of file
......@@ -32,9 +32,10 @@
"!**.md",
"!**.gitignore",
"!yarn.lock",
"!assets/screenshots${/*}",
"!test",
"!assets",
"!FUNDING.yml",
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts}",
"!**/node_modules/.bin",
"!**/*.{o,hprof,orig,pyc,pyo,rbc}",
"!**/._*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.flowconfig,.yarn-metadata.json,.idea,appveyor.yml,.travis.yml,circle.yml,npm-debug.log,.nyc_output,yarn.lock,.yarn-integrity}",
......@@ -58,6 +59,8 @@
"arch": "universal"
}
],
"gatekeeperAssess": false,
"hardenedRuntime": true,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"icon": "build/icon.icns",
......@@ -73,24 +76,23 @@
}
},
"mas": {
"asar": true,
"asarUnpack": [
"node_modules/fsevents"
],
"hardenedRuntime": false,
"provisioningProfile": "build/distribution.provisionprofile",
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist",
"entitlementsLoginHelper": "build/entitlements.mas.loginhelper.plist"
},
"masDev": {
"asar": true,
"asarUnpack": [
"node_modules/fsevents"
],
"hardenedRuntime": false,
"provisioningProfile": "build/development.provisionprofile",
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist",
"entitlementsLoginHelper": "build/entitlements.mas.loginhelper.plist"
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
},
"win": {
"target": [
......
......@@ -605,10 +605,10 @@ function createTodoContext(todoTableRow) {
function sortTodosInGroup(group) {
try {
// start at 1 to skip sorting method used for 1st level grouping
for(let i = 1; i < userData.sortBy.length; i++) {
const l = userData.sortBy.length;
for(let i = 1; i < l; i++) {
group.sort(function(a, b) {
// only continue if the two items have the same filters from all previous iterations
if(JSON.stringify(a[userData.sortBy[i-4]]) !== JSON.stringify(b[userData.sortBy[i-4]])) return
if(JSON.stringify(a[userData.sortBy[i-3]]) !== JSON.stringify(b[userData.sortBy[i-3]])) return
......@@ -620,11 +620,11 @@ function sortTodosInGroup(group) {
item2 = b[userData.sortBy[i]];
// if first item is empty it will be sorted after second item
if(!item1) return 1;
if(!item1 || (item1 > item2)) return 1;
// if second item is empty it will be sorted before first item
if(!item2) return -1;
if(!item2 || (item1 < item2)) return -1;
return item1.toString().localeCompare(item2.toString())
//return item1.toString().localeCompare(item2.toString())
});
}
......
......@@ -682,6 +682,12 @@ async function createWindow() {
mainWindow.loadFile(path.join(appData.path, "index.html"));
if(appData.os === "windows") {
new Badge(mainWindow, {
font: "10px arial"
});
}
// ########################################################################################################################
// MAIN MENU
// ########################################################################################################################
......@@ -910,9 +916,6 @@ if(!process.mas && (!app.requestSingleInstanceLock() && process.env.SLEEK_MULTIP
if(appData.channel === "AppImage" && userData.data.autoUpdate) autoUpdater.checkForUpdatesAndNotify()
if(appData.os === "windows") {
new Badge(mainWindow, {
font: "10px arial"
});
// identifier for windows store
app.setAppUserModelId("RobinAhle.sleektodomanager")
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment