Commit 7cf52fed by Lee Munkyeong

Conflict対応。

parent 4c63bc20
......@@ -109,3 +109,95 @@ CHAT_DB.getUsersInRoom = function(roomId) {
return JSON.parse(android.getUsersInRoom(roomId));
}
}
// アーカイブ一覧
var iosArchiveList;
CHAT_DB.callGetArchiveList = function() {
if (CHAT_UTIL.isIOS()) {
iosArchiveList = "";
webkit.messageHandlers.getArchiveList.postMessage();
} else if (CHAT_UTIL.isAndroid()) {
CHAT_UI.refreshArchiveScreen();
}
};
CHAT_DB.getIosArchiveList = function(archiveList) {
iosArchiveList = archiveList;
CHAT_UI.refreshArchiveScreen();
};
CHAT_DB.getArchiveList = function() {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(iosArchiveList);
} else if (CHAT_UTIL.isAndroid()) {
// TODO
}
};
CHAT_DB.updateArchiveList = function() {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateArchiveList.postMessage();
} else if (CHAT_UTIL.isAndroid()) {
// TODO
}
};
// アーカイブ一覧検索
var iosSearchArchiveList;
var searchWord;
CHAT_DB.callGetArchiveByName = function(keyword) {
if (CHAT_UTIL.isIOS()) {
iosSearchArchiveList = "";
searchWord = keyword;
webkit.messageHandlers.getArchiveByName.postMessage({keyword});
} else if (CHAT_UTIL.isAndroid()) {
ARCHIVE_UI.refreshSearchScreen(keyword);
}
};
CHAT_DB.getIosSearchArchiveList = function(archiveList) {
iosSearchArchiveList = archiveList;
ARCHIVE_UI.refreshSearchScreen(searchWord);
};
CHAT_DB.getArchiveByName = function(archiveName) {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(iosSearchArchiveList);
} else if (CHAT_UTIL.isAndroid()) {
// TODO
}
};
// アーカイブ詳細
var iosArchiveDetail;
CHAT_DB.getIosArchiveDetail = function(archiveDetail) {
iosArchiveDetail = archiveDetail;
CHAT_DB.callGetArchiveDetail(archiveDetail.archiveId);
};
CHAT_DB.callGetArchiveDetail = function(archiveId) {
if (CHAT_UTIL.isIOS()) {
iosArchiveDetail = "";
webkit.messageHandlers.getArchiveDetail.postMessage({archiveId});
} else if (CHAT_UTIL.isAndroid()) {
CHAT_UI.refreshArchiveDetailScreen(archiveId);
}
};
CHAT_DB.getArchiveDetail = function() {
if (CHAT_UTIL.isIOS()) {
return JSON.parse(iosArchiveDetail);
} else if (CHAT_UTIL.isAndroid()) {
// TODO
}
};
CHAT_DB.updateArchiveDetail = function(archiveId) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateArchiveDetail.postMessage({archiveId});
} else if (CHAT_UTIL.isAndroid()) {
// TODO
}
};
Markdown is supported
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