Widget was only connecting the Core to itself during initialization, but the Core instance could change during a restartCore call. This commit will make Widget link the Core to itself when it changes rather than only on initialization.
Fixes#5710
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
* increase signal granularity
* reduce state in GroupChatForm
* remove differentiation of "joined" and "online" peers, it doesn't exist in toxcore and can't be tracked reliably in qTox
* add system message when peer name changes, even if due to alias
* add system message when self name changes, for clarity
Blocked status will represent friends who are removed from Toxcore, but who still exist in UI and can be readded to Toxcore at a future time using their public key. Blocked friends are similar to offline friends, but have a different status icon and will be seperated in the friends list.
Caused race where peer plays audio, then is removed from group, then we
process audio played signal and lookup their peerId in core where it
doesn't exist. Now Group will effectively contain the peer until the
peer list changed slot is processed.
Partial fix for #5511
Replace double static_cast of pointer with reinterpret_cast.
reinterpret_cast in unsafe because the underlying data may be
meaningless in the new type, static cast to void then to a new pointer
type has exactly the same problem. This is our intention here.
Since real offline message reliability issue was fixed in PR #4607, now removing all the workarounds that had been added. Offline messages are now sent as soon as we see our friend come online, and at no other time. Fixes 2 minute wait time before attempting to send if message is entered while you or friend is offline, removes 2 minute constant retry timer, removes 250ms delay between seeing friend come online and sending offline messages.