mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 00:48:30 +00:00
[FIRE-36242] Display a notification if a chat transcript doesn't exist and tries to be opened externally
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "llgroupactions.h"
|
||||
#include "llconversationloglist.h"
|
||||
#include "llconversationloglistitem.h"
|
||||
#include "llnotificationsutil.h" // <FS:TJ/>
|
||||
#include "llviewermenu.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h" // <FS:CR>
|
||||
@@ -360,8 +361,16 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
|
||||
// <FS:CR> Open conversation history externally
|
||||
else if ("chat_history_external" == command_name)
|
||||
{
|
||||
gViewerWindow->getWindow()->openFile(LLLogChat::makeLogFileName(
|
||||
LLConversationLog::getInstance()->getConversation(selected_conversation_session_id)->getHistoryFileName()));
|
||||
std::string log_file_name = LLLogChat::makeLogFileName(
|
||||
LLConversationLog::getInstance()->getConversation(selected_conversation_session_id)->getHistoryFileName());
|
||||
if (gDirUtilp->fileExists(log_file_name))
|
||||
{
|
||||
gViewerWindow->getWindow()->openFile(log_file_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("ChatHistoryIsMissing");
|
||||
}
|
||||
}
|
||||
// </FS:CR>
|
||||
}
|
||||
|
||||
@@ -307,7 +307,15 @@ void LLFloaterConversationPreview::onMoreHistoryBtnClick()
|
||||
// <FS:CR> Open chat history externally
|
||||
void LLFloaterConversationPreview::onBtnOpenExternal()
|
||||
{
|
||||
gViewerWindow->getWindow()->openFile(LLLogChat::makeLogFileName(mChatHistoryFileName));
|
||||
std::string log_file_name = LLLogChat::makeLogFileName(mChatHistoryFileName);
|
||||
if (gDirUtilp->fileExists(log_file_name))
|
||||
{
|
||||
gViewerWindow->getWindow()->openFile(log_file_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("ChatHistoryIsMissing");
|
||||
}
|
||||
}
|
||||
|
||||
// [FS:CR] FIRE-6545
|
||||
|
||||
@@ -14976,4 +14976,16 @@ Error message:
|
||||
[ERROR_MESSAGE] ([ERROR_CODE])
|
||||
</notification>
|
||||
<!-- </FS:Zi> -->
|
||||
<!-- <FS:TJ>-->
|
||||
<notification
|
||||
icon="alert.tga"
|
||||
name="ChatHistoryIsMissing"
|
||||
type="alertmodal">
|
||||
Chat transcript file is missing. Either there are no transcripts for this chat, or transcripts aren't being saved.
|
||||
You can enable saving transcripts under Preferences > Privacy > Logs & Transcripts
|
||||
<usetemplate
|
||||
name="okbutton"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
<!-- </FS:TJ>-->
|
||||
</notifications>
|
||||
|
||||
Reference in New Issue
Block a user