Use first line of note as nickname

This commit is contained in:
Natsumi
2021-10-10 21:59:44 +13:00
parent cf2341198f
commit f9492fc6c4
2 changed files with 22 additions and 5 deletions

View File

@@ -1424,6 +1424,7 @@ speechSynthesis.getVoices();
$joinCount: 0,
$timeSpent: 0,
$lastSeen: '',
$nickName: '',
//
...json
};
@@ -5983,6 +5984,11 @@ speechSynthesis.getVoices();
var ref = this.friends.get(id);
if (ref) {
ref.memo = String(memo || '');
ref.$nickName = '';
if (memo) {
var array = memo.split('\n');
ref.$nickName = array[0];
}
}
};
@@ -6190,10 +6196,16 @@ speechSynthesis.getVoices();
ref,
name: '',
no: ++this.friendsNo,
memo: ''
memo: '',
$nickName: ''
};
this.getMemo(id).then((memo) => {
ctx.memo = memo;
ctx.$nickName = '';
if (memo) {
var array = memo.split('\n');
ctx.$nickName = array[0];
}
});
if (typeof ref === 'undefined') {
ref = this.friendLog.get(id);
@@ -10417,6 +10429,11 @@ speechSynthesis.getVoices();
var ref = this.friends.get(userId);
if (ref) {
ref.memo = String(memo || '');
ref.$nickName = '';
if (memo) {
var array = memo.split('\n');
ref.$nickName = array[0];
}
}
});
D.visible = true;