1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
Commit Graph

2480 Commits

Author SHA1 Message Date
Mick Sayson
c7efe320d2 refactor(filetransfer): Move file transfer progress into ToxFile
* Refactor/test ToxFileProgress to ensure that when it's moved it
  behaves well
* Notice problems with speed averaging. We were average speeds without
  keeping track of the times they were over. Adding samples of different
  lengths would result in incorrect speeds. Refactor whole class to correct
* Move ToxFileProgress to be a member of ToxFile
* Remove duplicated members between ToxFile and ToxFileProgress
* Move sample addition into CoreFile
2021-12-11 15:38:35 -08:00
Mick Sayson
3bc4aa52be fix(filetransfer): Fix UI inconsistencies with pause/resume 2021-12-11 13:56:08 -08:00
Mick Sayson
ffef0e3796
refactor(chatlog): Rename ChatLog -> ChatWidget
* Makes the distinction between IChatLog (the model class) and
  ChatWidget (the view class) more clear
2021-11-21 16:18:45 -08:00
Mick Sayson
b36a38e716
feat(chatlog): Re-implement sliding window ChatLog view
* Replace lines/messages with helper class to synchronize state between
  IChatLog and ChatLog more easily
* selection indexes have been replaced with ChatLine::Ptrs, this is to
  ensure consistency while the view slides around
    * This has another benefit of removing all the code that has to
      manually slide the selection boxes around
* Replaced all insertion/removal functions with single "insertAtIdx".
  This helps ensure that mappings between ChatLogIdx and position within
  the view are captured correctly as items in the view slide around
* workerTimeout replaced with more generic name "renderFinished" that is
  used in synchronous and asynchronous paths
* Removed unused function ChatForm::insertChatMessage
* Re-implemented "Go to current date" with new ChatLog APIs
* Removed unused GenericChatForm::addSystemDateMessage. This is handled
  by ChatLog now
* Resolves #6223
* Resolves #5878
* Resolves #5940
2021-11-21 16:18:44 -08:00
Mick Sayson
b7a88cde6e
refactor(chatlog): Move rendering of messages from GenericChatForm -> ChatLog
* Simplifies reasoning about who owns what functionality between
  GenericChatForm and ChatLog. GenericChatForm is now just a layout
  class and ChatLog handles all interactions with retrieving and
  displaying messages from the model
* Reasoning for work is described in more detail in #6223
2021-11-21 16:18:32 -08:00
Mick Sayson
dd7df35720
revert(chatlog): Revert cleanup
* Fix compilation issues caused by incorrect merges
2021-11-21 16:17:35 -08:00
Mick Sayson
00ab89c3ce
revert(chatlog): "feat: load messages from the database before date"
This reverts commit fb2957c5ee.
2021-11-21 16:17:35 -08:00
Anthony Bilinski
041b697e77
revert(chatlog): "load messages from the database after date"
This reverts commit b705ac8060.
2021-11-21 16:17:35 -08:00
Anthony Bilinski
31346423e1
revert(chatlog): "edit function "Load chat history""
This reverts commit 6de1173c17.
2021-11-21 16:17:34 -08:00
Anthony Bilinski
1104417022
revert(chatlog): "edit load history in search"
This reverts commit 8c4b1e00a1.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
f29e948bed
revert(chatlog): "add action "Go to current date""
This reverts commit 2a9648d12c.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
b9cf7f428d
revert(chatlog): "edit position chat after load history"
This reverts commit c2d5b422b3.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
340496bd6e
revert(chatlog): "remove part messages from chat"
This reverts commit 4c7ecb6024.
2021-11-21 16:17:10 -08:00
Anthony Bilinski
bdbf1f61a8
revert(chatlog): "simple edit code"
This reverts commit b807998fe9.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
b0b74cfe92
revert(chatlog): "edit load history when scrolling"
This reverts commit 0a9e72020e.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
af3e0183b6
revert(chatlog): "prohibition to remove messages in group chat"
This reverts commit 5aeac56b76.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
db3eaa8872
revert(chatlog): "fix a crash when there are no messages to load"
This reverts commit 040c6b95ae.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
3a19eaddb5
revert(chatlog): "fix: data validation during the search"
This reverts commit acb91ed731.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
59efeeb3e7
revert(chatlog): "feat: check chat status before start a search"
This reverts commit ce570927b1.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
37b58ee8ee
revert(chatlog): "feat: save selected search text after scrolling up"
This reverts commit dbf880078e.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
db0656a92c
revert(chatlog): "optimize load messages during the search"
This reverts commit 6de307e6b9.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
335ce790e9
revert(chatlog): "scroll bar stuck to bottom (fix #5755)"
This reverts commit 38df897e02.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
146d93e159
revert(chatlog): "add comments for functions that load history"
This reverts commit 5fc1afbab5.
2021-11-21 16:17:08 -08:00
Anthony Bilinski
5fc273da94
revert(chatlog): partially revert "prevent invalid history access"
This partially reverts commit e3e6e1d9c4.
2021-11-21 16:17:08 -08:00
Brandon Mosher
1438f8f766 refactor: Provide a Virtual Method Anchor for Classes in Headers
Define at least one virtual method in polymorphic class cpp files to
improve link efficiency. Do so by defining a defaulted destructor or
another overridden virtual method in the class cpp file.
Also add explicitly defaulted copy/move constructors and assignment
operators to follow the rule of five and to avoid compiler suppression
of these functions due to the addition of a user-provided destructor.
Where neccessary, create new cpp files and add them to CMakeLists and
Testing.cmake. Set the -Wweak-vtables by default when compiling with
clang to issue warnings for new classes that do not comply with this
pattern.

See http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers.

Fixes #6036.
2021-10-26 16:47:40 +00:00
woxcab
d621d74511
fix(ui): reorder the window title 2021-10-24 23:30:30 -07:00
Anthony Bilinski
26f021e8bd
Merge pull request #6388
bodwok (1):
      fix(ui): contact list optimization
2021-10-24 22:29:14 -07:00
Mick Sayson
7c218b389d
feat(chatlog): Add image preview on paste
Reuse code from the file transfer widget to provide an image preview
on paste/grab. This prevents users from accidentally sending images they
did not mean to when their clipboard is not in the state they thought it
was.

Implementation exposes the genericchatlog vbox to the child classes and
chatform injects the imagepreview into it.
2021-10-24 22:06:58 -07:00
Anthony Bilinski
8462207a58
Merge pull request #6387
Jimi Huotari (2):
      fix(build): don't connect UpdateCheck when -DUPDATE_CHECK=OFF
      fix(UI): hide update related elements when -DUPDATE_CHECK=OFF
2021-10-24 20:45:52 -07:00
Mick Sayson
916834fb9c feat(chatlog): Add SystemMessages to SessionChatLog
* Rendering of system messages consolidated into single place
* API added to ichatlog to insert a system message at current location
* System messages are now used as type + args which will fit nicely with
  the work in #6221
2021-10-16 14:29:57 -07:00
bodwok
45b69519c4
fix(ui): contact list optimization 2021-10-05 01:04:06 +03:00
Jimi Huotari
db8af0561d fix(UI): hide update related elements when -DUPDATE_CHECK=OFF 2021-10-03 02:25:06 +03:00
Jimi Huotari
50063f76ab fix(build): don't connect UpdateCheck when -DUPDATE_CHECK=OFF 2021-10-03 02:24:48 +03:00
sudden6
bde6dc0df0
fix: change color equation for groupchat names 2021-08-29 01:04:43 +02:00
sudden6
c95057283e
fix: correctly destroy on group remove 2021-08-28 00:26:45 +02:00
bodwok
35244db50e
refactor(ui): code improvement 2021-06-22 21:26:17 +03:00
bodwok
1d5dd8063e
refactor(ui): code improvement 2021-06-17 19:13:32 +03:00
bodwok
18b34b325f
refactor(ui): separation of responsibility for sorting the contact list 2021-06-13 20:11:19 +03:00
Anthony Bilinski
f3f1f08afb
refactor(ui): using the isCompact function 2021-06-06 03:25:21 -07:00
Anthony Bilinski
e6bc355bc7
fix(ui): passing arguments from the CircleWidget constructor 2021-06-06 03:25:17 -07:00
Anthony Bilinski
479cd90f9c
chore(i18n): Add new languages
Language codes: BER, GL, KN, SI, SQ
2021-03-04 05:31:02 -08:00
bodwok
b98801f42f
fix(ui): add group widgets on start with "Activity" mode 2021-02-19 19:13:51 +03:00
Mick Sayson
d338ed97d9
refactor(chatform): Move typing notification creation into ChatLog
* Part of attempt to reduce interdependencies between
  ChatForm<->ChatLog.
2021-02-01 05:09:26 -08:00
Anthony Bilinski
fe421d11a1
Merge pull request #6294
Mick Sayson (1):
      refactor(chatform): Use IChatLog to get date in GenericChatForm
2021-01-31 00:57:01 -08:00
Mick Sayson
d0f4c336ba
refactor(chatform): Use IChatLog to get date in GenericChatForm
* Allows for deletion of APIs returning ChatLine::Ptr from ChatLog
* Bonus removal of unused "getFirstTime" function from GenericChatForm
2021-01-30 22:35:31 -08:00
Mick Sayson
26701283cd
feat(extensions): Split messages on extended messages
v0.0.2 of toxext_extended_messages brought in a user configurable max
message size. This changeset implements the minimum work required for
qTox to work sanely under the new API.

* Hardcode a max message size for all friends
* If a friend negotiates a max message size below the hardcoded value
  pretend they do not have the extension
* Move splitMessage out of Core to MessageProcessor
* Updates to allow for extended messages to be split
2021-01-30 18:15:49 -08:00
Mick Sayson
b715815011
feat(extensions): UI updates for extension support
Added a UI element to indicate extension support of the chatroom. For
all groups it will always be red since we do not support extensions in
groups. In a 1-1 chat the indicator will either be green/yellow/red
depending on if the friend has support for all/some/none of qTox's
desired extension set.
2021-01-30 12:52:07 -08:00
Mick Sayson
5f5f612841
feat(messages): History and offline message support for extended messages
* Added new negotiating friend state to allow delayed sending of offline
messages
* Added ability to flag currently outgoing message as broken in UI
* Reworked OfflineMsgEngine to support multiple receipt types
    * Moved resending logic out of the OfflineMsgEngine
    * Moved coordination of receipt and DispatchedMessageId into helper
    class usable for both ExtensionReceiptNum and ReceiptNum
    * Resending logic now has a failure case when the friend's extension
    set is lower than the required extensions needed for the message
    * When a user is known to be offline we do not allow use of any
    extensions
* Added DB support for broken message reasons
* Added DB support to tie an faux_offline_pending message to a required
extension set
2021-01-30 12:52:06 -08:00
Mick Sayson
7474c6d8ac
feat(messages): Multipacket message support
* Introduced ToxExt and CoreExt abstraction
    * Along with interfaces for mocking and unit testing
* Add "supportedExtensions" concept to Friend
* Dispatch messages to CoreExt instead of Core when friend supports
extended messages
    * Only split messages for core when extended messages are unavailable
* Offline message engine/History not altered. Currently only valid for
an existing session after extension negotiation has completed
2021-01-30 12:52:06 -08:00
Anthony Bilinski
5bb89f3e0b
Merge pull request #6274
begasus (2):
      feat(haiku): Don't use fstack-protector on Haiku
      feat(haiku): Haiku doesn't use sys/errno.h
2021-01-23 19:38:32 -08:00