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

102 Commits

Author SHA1 Message Date
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
a9f7c0ca7e
refactor(chatlog): Store ChatLine::Ptr in messages instead of ChatMessage
* This simplifies future refactoring since the rest of ChatLog expects
  to be working with the base class
2021-11-21 16:18:40 -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
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
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
b0b74cfe92
revert(chatlog): "edit load history when scrolling"
This reverts commit 0a9e72020e.
2021-11-21 16:17:09 -08:00
Anthony Bilinski
e18725c966
revert(chatlog): "fix stick to bottom behavior"
This reverts commit f2fa601073.
2021-11-21 16:17:08 -08: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
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
TriKriSta
3bf3128a4f
fix(ui): implement and connect reloadTheme in leaf classes
This allows leaf classes to update independently when the GUI has changed themes, without
their parent having to call updateTheme() manually.

Fix #5924
Fix #5592
2020-08-28 10:19:53 -07:00
Anthony Bilinski
8abd4e47e9
refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
Anthony Bilinski
ef8c2b7cb3
Merge branch 'v1.17-dev' 2020-03-28 01:43:40 -07:00
Anthony Bilinski
a7f3495956
fix(chatlog): enable dynamic view range in chatlog with history disabled
Message caching is handled by SessionChatLog in memory even when history is
disabled. ChatLog doesn't need to worry about how the messages its rendering
are being stored. Dynamic loading up and down in chatlog is sitll functional.
2020-03-21 19:41:22 -07:00
Anthony Bilinski
e5a6708877
Merge branch 'v1.17-dev' 2020-03-19 13:21:14 -07:00
sudden6
f2fa601073
fix(chatlog): fix stick to bottom behavior
This commit fixes the behavior when a message is received while the
chatlog is scrolled to the bottom. With this change, the chatlog will
stick to the bottom when it is scrolled all the way down. If it is
somewhere in the middle (e.g. for search) the chatlog will not change
its position.
2020-03-15 16:45:09 +01:00
Anthony Bilinski
e9570eafdf
Merge branch 'v1.17-dev' 2019-11-25 16:56:50 -08:00
Mick Sayson
64bae38b99 fix(chatform): Prevent date line oscillations maxing CPU
The previous implementation of hiding the date line would cause 100% cpu
usage. When the date line was shown it would hide the top line, causing
the date line to be hidden again due to a state change in which dates
was visible.

This is a minimal patch to work around the issue by pretending the line
covered by the date line is the first visible line when the dateline is
shown

Fixes #5620
2019-11-09 15:00:36 -08:00
Anthony Bilinski
1ad561ca4c
refactor(style): use only one of override, virtual, or final
following https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override

virtual means exactly and only "this is a new virtual function."
override means exactly and only "this is a non-final overrider."
final means exactly and only "this is a final overrider."

Nothing was changed from e.g. override to final, just reduced duplication of
these labels.
2019-10-19 12:26:50 -07:00
Anthony Bilinski
73fedbba79
Merge branch 'v1.17-dev' 2019-10-10 03:11:19 -07:00
Anthony Bilinski
b95bac238d
fix(chatlog): update precise selection when chatlog content changes
Fix #5769. Precise selections (within one chatline) need to be invalidated when
the line they are apart of is removed from the chatlog.
2019-09-28 18:00:20 -07:00
Anthony Bilinski
08b2c848e2
refactor(chatlog): use enum class instead of enum to avoid implicit casts 2019-09-28 17:07:06 -07:00
Mick Sayson
4b691f9392 fix(chatlog): Remove invalid usages of raw chatlog indexes
ChatLogIdx is a strong type where the underlying data is only supposed
to be used in very rare circumstances. The ChatLog providing the indexes
provides no guarantees about what the first ChatLogIdx or last
ChatLogIdx will be. This commit removes unnecessary casts to underlying
data and fixes assumptions made about the underlying data
2019-09-21 14:26:14 -07:00
Anthony Bilinski
2bba12175e
fix(chatlog): update multi line selection on chatlog change
Fixes crash due to out of bound access. Fixes selection box jumping on history load.

Fix #5769
2019-08-30 03:50:25 -07:00
TriKriSta
5aeac56b76 feat: prohibition to remove messages in group chat 2019-07-22 21:16:26 +03:00
TriKriSta
0a9e72020e refactor: edit load history when scrolling 2019-07-22 21:16:26 +03:00
TriKriSta
4c7ecb6024 feat: remove part messages from chat 2019-07-22 21:16:26 +03:00
TriKriSta
c2d5b422b3 feat: edit position chat after load history 2019-07-22 21:16:26 +03:00
TriKriSta
b705ac8060 feat: load messages from the database after date 2019-07-22 21:16:26 +03:00
TriKriSta
fb2957c5ee feat: load messages from the database before date 2019-07-22 21:16:26 +03:00
jenli669
04a9bc46f4
docs(copyright): update and add copyright info
zealously updates and adds qTox copyright information.

Fixes #5713
2019-06-28 01:18:26 +02:00
TriKriSta
f64bb48a92 refactor: edit styles
edit typing color and image,
move colors for background selected text and background searched text
in palette files
2019-03-02 01:58:58 +02:00
sudden6
d6d433c617
Merge pull request #5558
TriKriSta (8):
      style: add dark style
      refactor: move palette colors in ini files
      feat: edit reload themes
      refactor: rename palette colors
      style: edit styles
      feat: add color for links in palette
      refactor: edit variables for themes
      fix: initialization theme
2019-02-26 18:20:28 +01:00
TriKriSta
e146c11f0f feat: edit reload themes 2019-02-21 15:53:31 +02:00
TriKriSta
d0e8ba8b9c feat: show date in chat log 2019-01-28 21:15:52 +02:00
iphydf
52a5951d26
chore: Use nullptr instead of 0 for NULL pointer constants. 2018-09-07 21:38:59 +00:00
TriKriSta
01281e87cb
Merge branch 'master' into search 2018-08-14 01:08:54 +03:00
ezavod
2cdff7e9ed
fix(chatform): mark message with triple click
Fixes #5211. Only trigger on triple clicks that are caused by the same
mouse button clicked successively.
2018-07-09 16:33:30 +02:00
TriKriSta
610e04aa26 feat: use search settings 2018-06-24 21:11:20 +03:00
Anthony Bilinski
ca32e77d74
feat(history): load set number of messages from history
Fix #3124
Fix #3004

Instead of loading a set 7 days of history. Better performance when there are lots of messages, and better context when friends haven't talked in over a week.

Removed historyBaselineDate, introduced in deb8440c6a to fix duplicate messages, but duplicate messages were very likely fixed by https://github.com/qTox/qTox/pull/4607.

Also refactored history loading.
2018-05-06 15:31:54 -07:00
Anthony Bilinski
5dc4e6de81
chore(legal): update copyright date to 2018 for all source files 2018-04-25 17:33:38 -07:00
TriKriSta
de9c906117 feat: edit load history for search 2018-02-10 17:56:16 +02:00
ezavod
3acbc148f5 feat(chatform): mark message with triple click
This is an implementation of proposal #4003.
2017-03-28 17:20:01 +02:00
Zetok Zalbavar
80f5de31b3
style: reformat current C++ codebase using clang-format 2017-02-26 11:52:45 +00:00
Yuri
742583bb9e fix(font): Made font changes in settings apply on screen instantly.
Before the user had to restart qTox for the font change to take effect.
Now it changes instantly.
2017-02-05 21:49:30 -08:00
tux3
a7de2680d9
feat(UI): Add 'Copy link' context menu item
Fixes #927
2016-12-07 13:54:40 +01:00
Zetok Zalbavar
7b60a5dd36
chore: explicitly mention that copyright belongs to qTox contributors 2016-11-29 11:12:06 +00:00
Nils Fenner
f00b9008e6
feat(settings): add notification signals for changed settings values
Makes changes to settings application wide transparent. The properties section is optional in theory, but comes in very handy, if we decide to access settings e.g. from within a script context.
2016-08-14 18:08:24 +02:00
Diadlo
abf7b42324
fix(chatlog): Don't delete active transfer widget
Fix #3275.
2016-07-31 11:44:21 +03:00