v2019.08.20

This commit is contained in:
pypy
2019-08-20 12:52:20 +09:00
parent eee4f6cce6
commit 8a699c63ae
2 changed files with 47 additions and 39 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ namespace VRCX
m_Connection.Dispose(); m_Connection.Dispose();
} }
public void Execute(string sql, IDictionary<string, object> param = null) public int ExecuteNonQuery(string sql, IDictionary<string, object> param = null)
{ {
m_Lock.EnterWriteLock(); m_Lock.EnterWriteLock();
try try
@@ -38,7 +38,7 @@ namespace VRCX
C.Parameters.Add(new SQLiteParameter("@" + prop.Key, prop.Value)); C.Parameters.Add(new SQLiteParameter("@" + prop.Key, prop.Value));
} }
} }
C.ExecuteNonQuery(); return C.ExecuteNonQuery();
} }
} }
finally finally
@@ -47,7 +47,7 @@ namespace VRCX
} }
} }
public void ExecuteQuery(IJavascriptCallback callback, string sql, IDictionary<string, object> param = null) public void Execute(IJavascriptCallback callback, string sql, IDictionary<string, object> param = null)
{ {
m_Lock.EnterReadLock(); m_Lock.EnterReadLock();
try try
+17 -9
View File
@@ -4479,7 +4479,7 @@ if (window.CefSharp) {
this.sweepGameLog(); this.sweepGameLog();
// sweepGameLog로 기록이 삭제되면 // sweepGameLog로 기록이 삭제되면
// 아무 것도 없는데 알림이 떠서 이상함 // 아무 것도 없는데 알림이 떠서 이상함
if (this.gameLogTable.length) { if (this.gameLogTable.data.length) {
this.notifyMenu('gameLog'); this.notifyMenu('gameLog');
} }
} }
@@ -4948,8 +4948,8 @@ if (window.CefSharp) {
confirmButtonText: 'Confirm', confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
type: 'info', type: 'info',
callback: (action2) => { callback: (action) => {
if (action2 === 'confirm') { if (action === 'confirm') {
API.clearFavoriteGroup({ API.clearFavoriteGroup({
type: ctx.type, type: ctx.type,
group: ctx.name group: ctx.name
@@ -5052,6 +5052,7 @@ if (window.CefSharp) {
$app.deleteFriendship(args.param.userId); $app.deleteFriendship(args.param.userId);
}); });
// FIXME: table에서 accept, decline 한 경우 제대로 안남을지도 모름
API.$on('FRIEND:REQUEST', (args) => { API.$on('FRIEND:REQUEST', (args) => {
var ref = API.user[args.param.userId]; var ref = API.user[args.param.userId];
if (ref) { if (ref) {
@@ -5065,6 +5066,7 @@ if (window.CefSharp) {
} }
}); });
// 여기도 그럼
API.$on('FRIEND:REQUEST:CANCEL', (args) => { API.$on('FRIEND:REQUEST:CANCEL', (args) => {
var ref = API.user[args.param.userId]; var ref = API.user[args.param.userId];
if (ref) { if (ref) {
@@ -5097,9 +5099,14 @@ if (window.CefSharp) {
} else { } else {
this.friendLog = {}; this.friendLog = {};
ref.friends.forEach((id) => { ref.friends.forEach((id) => {
this.friendLog[id] = { var ctx = {
id id
}; };
var user = API.user[id];
if (user) {
ctx.displayName = user.displayName;
}
this.friendLog[id] = ctx;
}); });
this.friendLogTable.data = []; this.friendLogTable.data = [];
this.saveFriendLog(); this.saveFriendLog();
@@ -5789,8 +5796,8 @@ if (window.CefSharp) {
D.avatars.push(ref); D.avatars.push(ref);
} }
} }
$app.sortUserDialogWorlds(); this.sortUserDialogWorlds();
$app.sortUserDialogAvatars(); this.sortUserDialogAvatars();
API.getFriendStatus({ API.getFriendStatus({
userId: D.id userId: D.id
}); });
@@ -6228,7 +6235,8 @@ if (window.CefSharp) {
} }
} }
D.rooms = []; D.rooms = [];
Object.values(map).sort((a, b) => b.users.length - a.users.length || b.occupants - a.occupants).forEach((v) => { Object.values(map).sort((a, b) => b.users.length - a.users.length ||
b.occupants - a.occupants).forEach((v) => {
var L = API.parseLocation(`${D.id}:${v.id}`); var L = API.parseLocation(`${D.id}:${v.id}`);
v.location_ = L; v.location_ = L;
v.location = L.tag; v.location = L.tag;
@@ -6665,7 +6673,7 @@ if (window.CefSharp) {
$app.newInstanceDialog.visible = false; $app.newInstanceDialog.visible = false;
}); });
$app.methods.buildInstanceTag = function () { $app.methods.buildInstance = function () {
var D = this.newInstanceDialog; var D = this.newInstanceDialog;
var tags = []; var tags = [];
tags.push((99999 * Math.random() + 1).toFixed(0)); tags.push((99999 * Math.random() + 1).toFixed(0));
@@ -6712,7 +6720,7 @@ if (window.CefSharp) {
var D = this.newInstanceDialog; var D = this.newInstanceDialog;
D.worldId = L.worldId; D.worldId = L.worldId;
D.accessType = 'public'; D.accessType = 'public';
this.buildInstanceTag(); this.buildInstance();
D.visible = true; D.visible = true;
} }
}; };