[Pull] Offline mode #190

Closed
opened 2020-06-03 22:15:40 +00:00 by mmarif · 19 comments
Owner

Closes #186


Original Pull att :https://gitea.com/gitnex/GitNex/pulls/190

Merged with: b6c0e94ee9

Closes #186 --- Original Pull att :https://gitea.com/gitnex/GitNex/pulls/190 Merged with: b6c0e94ee9afef02eb400e7f2724d66844ae862e
mmarif added this to the 2.3.0 milestone 2020-06-03 22:15:40 +00:00
mmarif added the
🎉 Feature
label 2020-06-03 22:15:40 +00:00
mmarif was assigned by 6543 2020-06-03 22:16:21 +00:00
Member

So RetroFit has already a cache function ...

So RetroFit has already a cache function ...
Author
Owner

Yes, it has using okhttp as interceptor.

Yes, it has using okhttp as interceptor.
Member

@mmarif it doesnt cache repo lists (stared repos, my repos, ...) and user avatars

but files if opend before work offline now (if you stay in a repo) 👍

@mmarif it doesnt cache repo lists (stared repos, my repos, ...) and user avatars but files if opend before work offline now (if you stay in a repo) :+1:
Author
Owner

What process you carried out to test.

You should have network when open the app and browse around the pages so the app can cache the contents. After that turn off network and you will be able to see the cached contents.

What process you carried out to test. You should have network when open the app and browse around the pages so the app can cache the contents. After that turn off network and you will be able to see the cached contents.
Member

@mmarif yes this works but offline mode in my definition is, once you cached the files, you should be able to close the app, switch off internet and then browse cached repos

@mmarif yes this works but offline mode in my definition is, once you cached the files, you should be able to close the app, switch off internet and then browse cached repos
Author
Owner

Not sure why its not working for you. I have made a video a while ago. Check if its what you want.

https://peertube.social/videos/watch/000a8348-b180-47d4-8775-4b924f80d7c1

Not sure why its not working for you. I have made a video a while ago. Check if its what you want. https://peertube.social/videos/watch/000a8348-b180-47d4-8775-4b924f80d7c1
Member

@mmarif - the cache is only used if contend has fully loaded (was my first problem)

Second:

@mmarif - the cache is only used if contend has fully loaded (was my first problem) Second:
Member

Test Device: pisikal, android 9.0.9

Test Device: pisikal, android 9.0.9
Member

Org avatars too

Org avatars too
Member

I'll test again ...

I'll test again ...
Author
Owner

@6543 how was your test?

@6543 how was your test?
Member

One thing still not work ...

One thing still not work ...
Member

ONLINE mode:

Without With PR

Tested with: emulated Android & physical device

ONLINE mode: Without | With PR ---- | ---- ![](https://user-images.githubusercontent.com/24977596/68765499-328ad900-061d-11ea-946c-a4059ea888cb.png) | ![](https://user-images.githubusercontent.com/24977596/68765497-30c11580-061d-11ea-97bb-b34265ce1e7c.png) Tested with: emulated Android & physical device
Author
Owner

So the name does not show in the Online mode in this PR, am I right?

Do you have full name in your profile saved bdw?

So the name does not show in the Online mode in this PR, am I right? Do you have full name in your profile saved bdw?
Member

Do you have full name in your profile saved bdw?

No

> Do you have full name in your profile saved bdw? No
Member
{
    "login": "6543",
    "full_name": "",
    "avatar_url": "https://gitea.com/user/avatar/6543/-1",
    "language": "",
    "is_admin": false,
    "username": "6543"
}

...

```json { "login": "6543", "full_name": "", "avatar_url": "https://gitea.com/user/avatar/6543/-1", "language": "", "is_admin": false, "username": "6543" } ``` ...
Author
Owner

I haven't checked that part of the code yet, but can you add full name and see if it is working.

I will check after that to make sure it pick username/login if full name is empty.

I haven't checked that part of the code yet, but can you add full name and see if it is working. I will check after that to make sure it pick username/login if full name is empty.
Member

@mmarif checked

you are right - this text field has no fallback to login name!

@mmarif checked you are right - this text field has no fallback to login name!
Member
@mmarif done -> fc27f7c73dab90933671998e6d7509bf2ebd65d2
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#190
No description provided.