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

52 Commits

Author SHA1 Message Date
Anthony Bilinski
f6a15366ef
fix(history): select broken messages from History, track in ChatLogMessage 2019-10-20 02:34:48 -07:00
Anthony Bilinski
cd75618e38
refactor(history): rename pending message variables
"Sent" to "Delivered", since that's what we're tracking also rename "isOffline"
to "isPending", which is boolean the same, but "isOffline" was opposite of its
correct value before, so boolean reverse the assignment.
2019-10-20 02:34:47 -07:00
Anthony Bilinski
b28dc30061
fix(history): move stuck pending message into broken_messages table
Fix #5776

Due to a long standing bug, faux offline message have been able to become stuck
going back years. Because of recent fixes to history loading, faux offline
messages will correctly all be sent on connection, but this causes an issue of
long stuck messages suddenly being delivered to a friend, out of context,
creating a confusing interaction. To work around this, this upgrade moves any
faux offline messages in a chat that are older than the last successfully
delivered message, indicating they were stuck, to a new table,
`broken_messages`, preventing them from ever being sent in the future.
2019-10-20 02:34:47 -07:00
Anthony Bilinski
f72f3f714d
fix(history): handle errors during db upgrade 2019-10-20 02:34:47 -07:00
Anthony Bilinski
dacfcdadac
refactor(history): apply db schema upgrade one version at a time
This allows upgrade steps to query the db at the last version and run C++ code
on the results, then do a single transaction to make the upgrade, instead of
all actions of each upgrade step being required to be part of the overall
upgrade transaction.
2019-10-20 02:34:47 -07:00
Mick Sayson
dbef0b7508
fix(offlinemsg): fix offline message dispatching on history load
* Fix callback hookup order in ChatHistory
* Add correct call to SessionChatLog to insert an unfinished message
* Fix incorrect logic in parsing History database response
2019-10-20 02:34:47 -07:00
Anthony Bilinski
64aa3eae4d
fix(history): select only pending history for the requested friend 2019-08-29 10:39:06 -07:00
TriKriSta
8c4b1e00a1 feat: edit load history in search 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
b0f32379d0 fix: check time for get num messages for friend (fix #5714) 2019-06-25 20:44:21 +03:00
Mick Sayson
ed514d7166 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
2019-06-21 11:01:35 -07:00
Mick Sayson
e607e6ecb4 refactor(chatlog): Add a class to manage history through the IChatLog interface 2019-06-21 11:01:35 -07:00
Anthony Bilinski
316893ace9
test(db): add db schema upgrade test 2019-05-15 13:26:21 -07:00
Anthony Bilinski
c12605db6d
fix(history): create file_transfers table in upgrade
* bug introduced in refactor 329172321d
2019-05-09 00:19:46 -07:00
Anthony Bilinski
329172321d
refactor(history): create db as part of schema upgrade
* update user_version as part of transaction, so that we rollback if update fails and don't increment version
* differentiate between two user_version 0 versions, to avoid the SQL error on new profile creation
* make table creation dependent on user_version, instead of creating tables if not exists every start
2019-05-05 14:52:32 -07:00
Anthony Bilinski
edf6b67313
refactor(core): strong type message receipt and row ID
Avoid implicit casting and invalid arithmetic.
2019-01-28 10:58:54 -08:00
TriKriSta
c3095ab150 fix: check valid date in getDateWhereFindPhrase 2018-12-22 00:36:38 +02:00
Anthony Bilinski
84362244da
refactor(files): change ToxFile's fileName to QString 2018-12-14 00:33:27 -08:00
Mick Sayson
25005c5c19 feat(db): File transfer history review comments 2018-12-05 21:15:14 -08:00
Anthony Bilinski
8427be6678 feat(db): add file hash to file history
Not currently used, but there are plans to display if a transfered file
has been modified, which the file hash will be needed for. Adding file
hash at the same time as file history also saves a db schema update.
2018-12-02 14:40:54 -08:00
Mick Sayson
d9b39b3102 feat(db): Hookup file history to the rest of the system 2018-12-02 14:40:53 -08:00
Mick Sayson
567ddfb203 feat(db): Database support for file history 2018-12-02 14:35:18 -08:00
Mick Sayson
fb805b9cdb feat(db): Support schema version upgrades 2018-12-02 14:35:04 -08:00
Jakie.OYMJ
e6d40be72e fix: add remove history prompt, clear log area after remove 2018-10-05 10:24:39 +08:00
TriKriSta
b6ab0ec2ca refactor: add SearchDirection 2018-08-14 01:06:28 +03:00
TriKriSta
706822123f refactor: delete sqlite in travis, edit some functions 2018-07-14 00:58:35 +03:00
TriKriSta
ea8bbfd8a5 refactor: use const and QStringLiteral 2018-07-08 14:02:03 +03:00
TriKriSta
17a97f1ff6 feat: add function for generating a filter for search word only 2018-07-08 12:33:37 +03:00
TriKriSta
74468fde32 docs: add documentation for some new functions 2018-06-29 23:10:14 +03:00
TriKriSta
4fdf73f2f0 refactor: remove commented code, use QStringLiteral 2018-06-29 19:31:34 +03: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
Anthony Bilinski
b852809d0c
fix(history): don't save own messages when history is disabled
Fix #5036
2018-03-30 01:50:12 -07:00
TriKriSta
fe4dd83d10 refactor: add/delete checks in search code 2018-02-15 13:21:05 +02:00
TriKriSta
3e05279c09 fix: add search symbol ' in history 2018-02-14 11:30:38 +02:00
TriKriSta
18fa8a745b feat: optimise search in history 2018-02-12 01:02:28 +02:00
TriKriSta
de9c906117 feat: edit load history for search 2018-02-10 17:56:16 +02:00
tWido
3257770bfa feat(chatform): Highlight chat history
Calendar dates with chat history highlighted with bold
Fixes #2296
2017-06-25 21:23:04 +02:00
Diadlo
365d703e8a
perf: Pass std::function by reference 2017-06-12 13:46:38 +03:00
Zetok Zalbavar
80f5de31b3
style: reformat current C++ codebase using clang-format 2017-02-26 11:52:45 +00:00
sudden6
38cecdc780
refactor(history): remove deprecated historykeeper
This commit removes historykeeper and code only used by it.

BREAKING CHANGE:
qTox can't open old historykeeper chatlogs after this commit. Use
previous versions to migrate to the new database.
2017-02-05 22:20:12 +01:00
Zetok Zalbavar
7b60a5dd36
chore: explicitly mention that copyright belongs to qTox contributors 2016-11-29 11:12:06 +00:00
Diadlo
b522da5bed
refactor(history): Moved creaton of RawDatabase from History constuctor 2016-11-06 12:37:39 +03:00
Diadlo
902828fcc2
docs(persistence): Added leading stars 2016-08-19 00:20:23 +03:00
Diadlo
1c547fc73f
docs(persistence): Change comment style 2016-07-27 23:39:22 +03:00
initramfs
1dabbca94c
feat(profile): show warning on failure to delete profile
Adds a few qWarning() statements when files fail to delete.
2016-04-29 13:07:27 +08:00
tux3
a0645d5cba
Fix #2700 2015-12-19 16:51:15 +01:00
tux3
489016f358
Fix #2439 2015-12-19 05:00:23 +01:00
tux3
9b9fa13636
Change column order when filling peer cache
A minor detail, but worth it.
2015-12-19 04:42:55 +01:00