1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Fixed note sorting

This commit is contained in:
Laurent Cozic 2017-10-21 17:53:43 +01:00
parent ad1c0f3958
commit 2675a89dda
7 changed files with 30 additions and 16 deletions

View File

@ -349,6 +349,11 @@ class AppGui {
this.logger().info('Got command: ' + cmd);
if (cmd === 'q' || cmd === 'wq' || cmd === 'qa') { // Vim bonus
await this.app().exit();
return;
}
let note = this.widget('noteList').currentItem;
let folder = this.widget('folderList').currentItem;
let args = cliUtils.splitCommandString(cmd);

View File

@ -565,6 +565,11 @@ class Application {
this.gui_.setLogger(this.logger_);
await this.gui_.start();
// Since the settings need to be loaded before the store is created, it will never
// receive the SETTINGS_UPDATE_ALL even, which mean state.settings will not be
// initialised. So we manually call dispatchUpdateAll() to force an update.
Setting.dispatchUpdateAll();
await FoldersScreenUtils.refreshFolders();
this.store().dispatch({

View File

@ -19,15 +19,15 @@ cp "$ROOT_DIR/app/autocompletion_template.txt" "$ROOT_DIR/build"
chmod 755 "$ROOT_DIR/build/main.js"
if [[ ! -f "$ROOT_DIR/package.json.md5" ]]; then
"$ROOT_DIR/update-package-md5.sh"
fi
# if [[ ! -f "$ROOT_DIR/package.json.md5" ]]; then
# "$ROOT_DIR/update-package-md5.sh"
# fi
# Add modules on top of main.js:
# - cache-require-paths to cache require() calls
# - app-module-path so that lib/something paths can be resolved.
PACKAGE_MD5=$(cat "$ROOT_DIR/package.json.md5")
#PACKAGE_MD5=$(cat "$ROOT_DIR/package.json.md5")
MAIN_PATH="$ROOT_DIR/build/main.js"
#LINE_TO_ADD="var osTmpdir = require('os-tmpdir'); process.env.CACHE_REQUIRE_PATHS_FILE = osTmpdir() + '/joplin-module-path-cache-$PACKAGE_MD5'; require('cache-require-paths'); require('app-module-path').addPath(__dirname);"
LINE_TO_ADD="require('app-module-path').addPath(__dirname);"

View File

@ -7,7 +7,7 @@
"url": "https://github.com/laurent22/joplin"
},
"url": "git://github.com/laurent22/joplin.git",
"version": "0.10.42",
"version": "0.10.43",
"bin": {
"joplin": "./main.js"
},

View File

@ -1 +1 @@
d781c96c28a1da5497cd02dc4fc4691b
2b4b9827cb040eb8a6c5d9eaf792df3d

View File

@ -4,7 +4,7 @@ set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
yarn upgrade
npm version patch
$SCRIPT_DIR/update-package-md5.sh
#$SCRIPT_DIR/update-package-md5.sh
touch "$SCRIPT_DIR/app/main.js"
bash $SCRIPT_DIR/build.sh
cp "$SCRIPT_DIR/package.json" build/

View File

@ -70,16 +70,20 @@ class Setting extends BaseModel {
this.cache_.push(c);
}
const keys = this.keys();
let keyToValues = {};
for (let i = 0; i < keys.length; i++) {
keyToValues[keys[i]] = this.value(keys[i]);
}
this.dispatchUpdateAll();
});
}
this.dispatch({
type: 'SETTINGS_UPDATE_ALL',
settings: keyToValues,
});
static dispatchUpdateAll() {
const keys = this.keys();
let keyToValues = {};
for (let i = 0; i < keys.length; i++) {
keyToValues[keys[i]] = this.value(keys[i]);
}
this.dispatch({
type: 'SETTINGS_UPDATE_ALL',
settings: keyToValues,
});
}