Offline mode #190

Merged
mmarif merged 4 commits from 186-offline-mode-using-cache into master 2019-11-13 15:52:53 +00:00
Owner

Closes #186

Closes #186
mmarif added the
Feature
label 2019-11-05 19:43:13 +00:00
mmarif self-assigned this 2019-11-05 19:43:14 +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
6543 approved these changes 2019-11-13 15:01:00 +00:00
Dismissed
6543 left a comment
Member

🎉

:tada:
6543 added the
LGTM-done
label 2019-11-13 15:01:29 +00:00
6543 added this to the 2.3.0 milestone 2019-11-13 15:01:32 +00:00
mmarif referenced this issue from a commit 2019-11-13 15:52:52 +00:00
mmarif closed this pull request 2019-11-13 15:52:53 +00:00
mmarif deleted branch 186-offline-mode-using-cache 2019-11-13 15:53:06 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No Assignees
2 Participants
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.