2019-06-03 23:25:05 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2021-09-29 11:29:39 +02:00
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
2019-06-03 23:25:05 +02:00
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
2021-05-25 22:39:06 +02:00
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
2019-06-03 23:25:05 +02:00
|
|
|
android:layout_width="match_parent"
|
2021-09-29 11:29:39 +02:00
|
|
|
android:layout_height="match_parent"
|
2019-06-03 23:25:05 +02:00
|
|
|
android:orientation="vertical">
|
|
|
|
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
|
|
android:id="@+id/loadingIndicator"
|
|
|
|
android:layout_width="match_parent"
|
2022-08-12 04:01:51 +02:00
|
|
|
android:layout_height="wrap_content"
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
android:indeterminate="true"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:visibility="gone" />
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
|
2021-09-29 11:29:39 +02:00
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
2019-06-03 23:25:05 +02:00
|
|
|
android:layout_width="match_parent"
|
2021-09-29 11:29:39 +02:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:theme="@style/AppTheme.AppBarOverlay"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:background="?attr/primaryBackgroundColor"
|
2022-08-12 04:01:51 +02:00
|
|
|
app:elevation="@dimen/dimen0dp">
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2020-06-06 22:04:07 +02:00
|
|
|
android:layout_width="match_parent"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
style="?attr/materialCardViewFilledStyle"
|
|
|
|
android:layout_marginStart="@dimen/dimen8dp"
|
|
|
|
android:layout_marginEnd="@dimen/dimen8dp"
|
|
|
|
android:layout_marginBottom="@dimen/dimen12dp"
|
|
|
|
app:cardElevation="@dimen/dimen0dp">
|
2021-03-21 16:56:54 +01:00
|
|
|
|
2020-06-06 22:04:07 +02:00
|
|
|
<LinearLayout
|
2021-09-29 11:29:39 +02:00
|
|
|
android:layout_width="match_parent"
|
2022-08-12 04:01:51 +02:00
|
|
|
android:layout_height="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
|
|
android:background="?attr/materialCardBackgroundColor"
|
|
|
|
android:padding="@dimen/dimen24dp"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
tools:ignore="UseCompoundDrawables">
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
android:layout_width="@dimen/dimen80dp"
|
|
|
|
android:layout_height="@dimen/dimen80dp"
|
|
|
|
style="?attr/materialCardViewFilledStyle"
|
|
|
|
android:layout_marginBottom="@dimen/dimen8dp"
|
|
|
|
app:cardElevation="@dimen/dimen0dp"
|
|
|
|
app:cardCornerRadius="@dimen/dimen40dp">
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/userAvatar"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:contentDescription="@string/generalImgContentText"
|
|
|
|
android:src="@mipmap/app_logo_round" />
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
<LinearLayout
|
2022-08-07 21:34:02 +02:00
|
|
|
android:layout_width="match_parent"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:paddingStart="@dimen/dimen24dp"
|
|
|
|
android:paddingEnd="@dimen/dimen10dp"
|
|
|
|
android:orientation="vertical">
|
2022-08-07 21:34:02 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/userFullName"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:textIsSelectable="true"
|
|
|
|
android:textSize="@dimen/dimen18sp" />
|
2020-06-06 22:04:07 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/userLogin"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginBottom="@dimen/dimen10dp"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:textIsSelectable="true"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
2020-06-06 22:04:07 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
tools:ignore="UseCompoundDrawables">
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/userLanguageIcon"
|
|
|
|
android:layout_width="@dimen/dimen16dp"
|
|
|
|
android:layout_height="@dimen/dimen16dp"
|
|
|
|
android:layout_marginEnd="@dimen/dimen4dp"
|
|
|
|
android:contentDescription="@string/generalImgContentText"
|
|
|
|
android:src="@drawable/ic_language"
|
|
|
|
app:tint="?attr/iconsColor" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/userLanguage"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:textIsSelectable="true"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</LinearLayout>
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2021-09-29 11:29:39 +02:00
|
|
|
<LinearLayout
|
2022-11-02 13:50:03 +01:00
|
|
|
android:layout_width="match_parent"
|
2021-09-29 11:29:39 +02:00
|
|
|
android:layout_height="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:layout_marginTop="@dimen/dimen20dp"
|
|
|
|
android:layout_marginBottom="@dimen/dimen0dp"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
android:baselineAligned="false">
|
2021-09-29 11:29:39 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:id="@+id/followers_section"
|
2021-09-29 11:29:39 +02:00
|
|
|
android:layout_width="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:gravity="center"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:text="@string/profileTabFollowers"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/user_followers_count"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:paddingTop="@dimen/dimen6dp"
|
|
|
|
android:textStyle="bold"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:id="@+id/following_section"
|
2021-09-29 11:29:39 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:layout_weight="1"
|
|
|
|
android:gravity="center"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:text="@string/profileTabFollowing"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/user_following_count"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:paddingTop="@dimen/dimen6dp"
|
|
|
|
android:textStyle="bold"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:id="@+id/starred_repos_section"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:gravity="center"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:text="@string/starredRepos"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/user_starred_repos_count"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:textColor="?attr/primaryTextColor"
|
|
|
|
android:paddingTop="@dimen/dimen6dp"
|
|
|
|
android:textStyle="bold"
|
|
|
|
android:textSize="@dimen/dimen14sp" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
2021-09-29 11:29:39 +02:00
|
|
|
|
|
|
|
</LinearLayout>
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2021-09-29 11:29:39 +02:00
|
|
|
</LinearLayout>
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
</com.google.android.material.card.MaterialCardView>
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
|
2022-08-12 04:01:51 +02:00
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<LinearLayout
|
2022-08-12 04:01:51 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:background="?attr/primaryBackgroundColor"
|
|
|
|
android:layout_marginTop="@dimen/dimen200dp"
|
|
|
|
android:orientation="vertical">
|
2022-08-12 04:01:51 +02:00
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
2022-11-02 13:50:03 +01:00
|
|
|
android:id="@+id/fragmentProfileCard"
|
2019-06-03 23:25:05 +02:00
|
|
|
android:layout_width="match_parent"
|
2021-04-13 20:56:50 +02:00
|
|
|
android:layout_height="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:layout_margin="@dimen/dimen8dp"
|
|
|
|
app:strokeWidth="@dimen/dimen2dp"
|
|
|
|
app:cardCornerRadius="@dimen/dimen10dp"
|
|
|
|
app:strokeColor="?attr/colorPrimary"
|
|
|
|
style="?attr/materialCardViewFilledStyle">
|
|
|
|
|
|
|
|
<com.google.android.material.tabs.TabLayout
|
|
|
|
android:id="@+id/tabs"
|
2022-08-12 04:01:51 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-06-03 23:25:05 +02:00
|
|
|
android:layout_height="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
app:tabTextAppearance="@android:style/TextAppearance.Material.Widget.TabWidget"
|
|
|
|
app:tabIndicatorGravity="stretch"
|
|
|
|
app:tabMode="fixed"
|
|
|
|
app:tabIndicatorColor="?attr/colorPrimary"
|
|
|
|
app:tabIndicatorFullWidth="true"
|
2022-08-26 19:00:08 +02:00
|
|
|
android:background="?attr/primaryBackgroundColor"
|
2022-11-02 13:50:03 +01:00
|
|
|
app:tabSelectedTextColor="@android:color/white"
|
|
|
|
app:tabTextColor="?attr/colorPrimary">
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<com.google.android.material.tabs.TabItem
|
|
|
|
android:id="@+id/profileTabFollowers"
|
|
|
|
android:layout_width="wrap_content"
|
2022-08-12 04:01:51 +02:00
|
|
|
android:layout_height="wrap_content"
|
2022-11-02 13:50:03 +01:00
|
|
|
android:text="@string/profileTabFollowers" />
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<com.google.android.material.tabs.TabItem
|
|
|
|
android:id="@+id/profileTabFollowing"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/profileTabFollowing" />
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
<com.google.android.material.tabs.TabItem
|
|
|
|
android:id="@+id/profileTabEmails"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/profileTabEmails" />
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
</com.google.android.material.tabs.TabLayout>
|
2022-08-12 04:01:51 +02:00
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
2022-11-02 13:50:03 +01:00
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<androidx.viewpager.widget.ViewPager
|
|
|
|
android:id="@+id/container"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/dimen48dp"
|
|
|
|
android:background="?attr/primaryBackgroundColor"
|
|
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
2019-06-03 23:25:05 +02:00
|
|
|
|
2021-09-29 11:29:39 +02:00
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|