Commit graph

1204 commits

Author SHA1 Message Date
Marek Černocký
187da67a39 Update Czech translation 2018-10-03 13:17:47 +00:00
Daniel Garcia Moreno
4ecc102962 Merge branch 'initial-sync-filter' into 'master'
Add filter to sync for initial sync

See merge request World/fractal!240
2018-09-28 06:40:10 +00:00
Daniel García Moreno
889383dbf8 Add filter to sync for initial sync 2018-09-27 20:23:58 +02:00
Daniel García Moreno
6c565f6e0b roomhistory: Remove build warnings
The room param for the RoomHistory was calculated using the AppOp, but
we're getting this in the new method params, so we can use directly the
room variable.
2018-09-26 10:44:22 +02:00
Daniel García Moreno
c1e84ba973 Fix load more in the new room history and fast sync
With the remove of the initial sync without a since param and the store
of the prev_batch for each room, the load_more messages isn't working
correctly.

I've detected two issues that this patch fixes:

1. The first problem is that it's possible to have rooms that doesn't
have the prev_batch, I'm solving this with a new backend call that loads
more using the last messages id and in the case that a new room doesn't
have messages we can use the last sync batch.

2. The second problem is when you load more, close and open again
Fractal, if you go to load more, the prev_batch is the last one so we're
not loading the corresponding messages, we continue loading from the
last one that's not what is showed. This is because at close we're
storing the last batch in cache, but we're only storing the last 40
messages. To solve this, I'm setting the prev_batch to None at store in
the cache so the first time we'll try to get more messages using the
last message id.
2018-09-26 10:35:12 +02:00
Julian Sparber
18262cb937 roomhistory: fix possible crash
This removes a unwrap
2018-09-25 18:06:40 +02:00
Julian Sparber
b5e71d57df roomhistory: fix listbox fill scrolledwindow 2018-09-25 16:35:50 +02:00
Julian Sparber
09f1b248cb roomhistory: use double ended Vector to store messages
- lazy load old messages on top of the history,
  and make sure they are loaded after initial messages
2018-09-25 16:35:50 +02:00
Julian Sparber
51bb89b43d roomhistory: fix loading wrong messages to room history
Once a new room was created the lazy loading closure kept loding
messages the the message history even when the room changed.
2018-09-25 16:35:48 +02:00
Julian Sparber
9e8262a41b roomhistory: cleanup old code 2018-09-25 16:15:37 +02:00
Julian Sparber
f7c15f4be7 roomhistory: remove loading spinner form room history 2018-09-25 16:07:39 +02:00
Julian Sparber
09608c7daf roomhistory: lazy load all stored room messages
Since the messages are lazy loaded, we can load all cached messages
when a room gets opened
2018-09-25 16:07:39 +02:00
Julian Sparber
b3d17f8d24 roomhistory: add custom widget for message history
The new widget for the history keeps track of the the messages in the
list, therefore it can update a message and how a message is displayed
It also adds lacy loading of a new message batch or cached messages (not
yet in use)
2018-09-25 16:07:39 +02:00
Daniel Garcia Moreno
10224b4655 Merge branch 'search' into 'master'
backend: remove outdated code

See merge request World/fractal!239
2018-09-25 13:35:33 +00:00
Julian Sparber
f7beaefb07 room: remove outdated code and cleanup
This removes outdated code to simplify the codebase, it makes it easier
to read.
2018-09-25 14:44:43 +02:00
Julian Sparber
976ed8d945 backend: remove outdated code for search
This removes outdated code, which was used to make search requests to
the server.
2018-09-25 12:15:19 +02:00
Daniel Garcia Moreno
766d38d91c Merge branch 'top' into 'master'
backend: get previous message with get messages api

See merge request World/fractal!237
2018-09-25 06:44:02 +00:00
Julian Sparber
899071ed7b backend: get previous message with get messages api
This replaces the get_context API call with the correct API to get older messages.
2018-09-24 18:32:07 +02:00
Jordan Petridis
e92bc69f33 Merge branch 'since_fix' into 'master'
store: make sure that since value is never empty

See merge request World/fractal!236
2018-09-24 15:23:59 +00:00
Julian Sparber
5b1989480b store: make sure that since value is never empty
this fixes initial sync fail because since is a empty string
2018-09-24 16:31:07 +02:00
Daniel García Moreno
cfa2245e65 Remove not needed mut 2018-09-24 13:48:50 +02:00
Daniel Garcia Moreno
845ddb4ab0 Merge branch 'since' into 'master'
Continue sync when reopeing fractal (makes first sync much faster)

See merge request World/fractal!232
2018-09-24 07:51:06 +00:00
Daniel García Moreno
861f8b2447 Remove not needed use Utc 2018-09-24 09:46:23 +02:00
Daniel García Moreno
4075ab9b63 Remove non needed to_string() for slice string 2018-09-24 09:45:20 +02:00
Daniel Garcia Moreno
3645d56430 Merge branch 'origin_server_ts' into 'master'
Made the code use origin_server_ts instead of age to calculate messages

See merge request World/fractal!235
2018-09-24 07:35:45 +00:00
Daniel Garcia Moreno
151edb8ff4 Merge branch 'utf8-selection' into 'master'
Fixed incorrect string slicing that would screw up UTF-8 strings

Closes #335

See merge request World/fractal!234
2018-09-24 07:03:23 +00:00
Rasmus Rendal
ae2206e612 Added spaces in division 2018-09-24 06:59:04 +00:00
Daniel Garcia Moreno
1793baba4c Merge branch 'uid_label' into 'master'
Uid label

Closes #318

See merge request World/fractal!233
2018-09-24 06:40:21 +00:00
Rasmus Rendal
8b1adf98ac Merge branch 'origin_server_ts' of https://gitlab.gnome.org/RasmusRendal/fractal into origin_server_ts 2018-09-23 20:39:09 +02:00
Rasmus Rendal
45e46b5b9a Made the code use origin_server_ts instead of age to calculate messages 2018-09-23 20:37:21 +02:00
Rasmus Rendal
b3d7d8906f Made the code use origin_server_ts instead of age to calculate messages 2018-09-23 20:16:50 +02:00
Alexandre Franke
483fd7968a Fix indentation 2018-09-23 13:00:50 +00:00
Rasmus Rendal
03ea93287b Fixed incorrect string slicing that would screw up UTF-8 strings 2018-09-23 14:01:52 +02:00
Rasmus Rendal
e0a91b06ce Changed the name to small-font, to make it a bit more general 2018-09-23 10:57:01 +02:00
Rasmus Rendal
4772e6f001 Made the text small again 2018-09-23 10:52:22 +02:00
Rasmus Rendal
a6109e7f58 Use dim-label instead of another CSS class 2018-09-23 10:43:17 +02:00
Rasmus Rendal
aab69fe4b1 Merge branch 'uid_label' of https://gitlab.gnome.org/RasmusRendal/fractal into uid_label 2018-09-23 10:36:54 +02:00
Julian Sparber
6ee0a66c8e backend: minor refactor use Option for since
This uses Option for the since value of a sync request
2018-09-22 22:49:02 +02:00
Rasmus Rendal
7d9685d61b Update members_list.rs 2018-09-22 19:46:18 +00:00
Rasmus Rendal
03e4da2e3f Added a label to the members list which shows MXID's 2018-09-22 21:42:44 +02:00
Rasmus Rendal
0f6e34412a Added a label to the members list which shows MXID's 2018-09-22 21:38:32 +02:00
Daniel Garcia Moreno
1e3b64737e Merge branch 'alatiera/build-stuff' into 'master'
Globals: Avoid duplication

See merge request World/fractal!231
2018-09-22 18:51:53 +00:00
Julian Sparber
9319222e83 backend: restart sync from where fractal was closed
this speeds up the first sync when opening fractal, it stores the
next_batch value from the last sync fractal made before closing, this
way the sync can start from this point.
2018-09-22 18:23:27 +02:00
Jordan Petridis
9d713ac701
Globals: Avoid duplication
Remove a bunch of stuff from build.rs and cleanup
the globals.rs module.
2018-09-22 17:25:58 +03:00
Daniel Garcia Moreno
f1fcb00dc4 Merge branch 'alatiera/macros' into 'master'
Macro-pocalypse

See merge request World/fractal!230
2018-09-22 09:11:11 +00:00
Daniel Garcia Moreno
7ffc87fb04 Merge branch 'header_message' into 'master'
messages: add update methode to message widget

See merge request World/fractal!229
2018-09-22 08:59:58 +00:00
Julian Sparber
80a3551da9 messages: store if a message row has a header 2018-09-22 02:31:08 +02:00
Julian Sparber
509355b433 messages: pass values to MessageBox instead of references 2018-09-22 01:47:57 +02:00
Julian Sparber
e70c671235 messages: add update methode to message widget
- Add the functionality to update a row, for it allowes only to update
  the header
- clean up some duplicated code
2018-09-22 01:47:54 +02:00
Julian Sparber
fff5f5ea4c backend: use derive to implement Clone
This replaces the Clone implementation for some backend types with
dervie Clone
2018-09-22 01:46:25 +02:00