Mick Sayson (8):
refactor(messages): Create class to manage sending/receiving friend messages from core
refactor(core): Remove length parameter from splitMessages
refactor(messages): Create class to manage sending/receiving group messages from core
fix(messages): Fix broken sanitized name for notifications/alert messages
refactor(messages): Replace QRegExp with QRegularExpression
refactor(chatlog): Add class to manage underlying chatlog state
refactor(chatlog): Add a class to manage history through the IChatLog interface
refactor(chatform): Remove message handling logic from gui path
Functional changes
* Offline messages are still sent when the chat log is cleared
* Spinner now does not wait for history to be complete, just a receipt
from our friend
* Export chat and load chat history are now available in group chats
* Merged save chat log and export chat log
* Note that we lost the info messages in the process
NonFunctional Changes
* FileTransferWidget slots only called for correct file
* Settings::getEnableGroupChatsColor now embedded in
GenericChatForm::colorizeNames
* Settings::setEnableGroupChatscolor now emits signal connected to
GenericChatForm::setColorizedNames to keep state in sync
* Chatlog history not reloaded on setPassword()
* I am pretty sure this had no purpose
* Removed a lot of responsibility from ChatForm
* History moved to ChatHistory implementation of IChatLog
* OfflineMsgEngine moved to FriendMessageDispatcher
* Export chat and load chat history moved to GenericChatLog
* Backed by IChatLog so can be used generically
* Message processing moved to FriendMessageDispatcher
* The action of sending files to coreFile is still handled by
ChatForm, but displaying of the sent messages is done through IChatLog
-> GenericChatForm
* Search moved to ChatHistory/SessionChatLog
* All insertion of chat log elements should be handled by
GenericChatForm now
* Removed overlapping responsibilities from GroupChatForm
* Search and message sending goes through ichatlog/messagedispatcher
too
* Lots of search functionality pushed down into IChatLog
* Some of the file logic was moved into Widget. This is mostly to avoid
scope increase of this PR even further.
* History APIs removed that were no longer used
* From the archeology I managed, MAX_GROUP_MESSAGE_LEN was a workaround
for an old toxcore bug. Testing removal of this parameter and replacing it
with tox_max_message_length() seems to work fine.
This commit ignores the possibility of invalid length error being thrown
by a title after we've already checked its size the first time. We also
assume that a group chat cannot cease existing while we iterate over the
retrieved groups.
Mick Sayson (3):
feat(offlinemsg): Force offline messages to always be enabled
refactor(offlinemsg): Decouple OfflineMsgEngine from other components
feat(offlinemsg): Enable offline messages with no history
Before we would alternate between status icon and online event icon.
Now each status has its own event version, so status doesn't appear to
alternate between online and the correct status.
e.g.
* viewBox is 16.1 wide, lock is 13.4 wide. change offset from 1.4 to 1.35
* dot is 6.8 wide, change offset from 4.65 to 4.6
* SVG partially generated by inkscape, partially manually edited