This commit is contained in:
Natsumi
2022-05-24 23:22:52 +12:00
parent 846ac31ef6
commit abd3e82898
2 changed files with 9 additions and 12 deletions

View File

@@ -6549,8 +6549,8 @@ speechSynthesis.getVoices();
this.getMemo(id).then((memo) => {
ctx.memo = memo;
ctx.$nickName = '';
if (memo) {
var array = memo.split('\n');
if (memo) {
var array = memo.split('\n');
ctx.$nickName = array[0];
}
});

View File

@@ -160,16 +160,13 @@ class Database {
async getAllMemos() {
var memos = [];
await sqliteService.execute(
(dbRow) => {
var row = {
userId: dbRow[0],
memo: dbRow[1]
};
memos.push(row);
},
'SELECT user_id, memo FROM memos'
);
await sqliteService.execute((dbRow) => {
var row = {
userId: dbRow[0],
memo: dbRow[1]
};
memos.push(row);
}, 'SELECT user_id, memo FROM memos');
return memos;
}