From 4d6ff4fa498e61edcb1cdef5e432fe0f15f9d822 Mon Sep 17 00:00:00 2001 From: kosh Date: Sun, 16 Jul 2017 23:27:09 +0800 Subject: [PATCH] release 4.0.1 --- app/build.gradle | 4 +- app/src/main/java/com/fastaccess/App.java | 6 +- .../data/dao/model/AbstractLogin.java | 5 +- .../data/dao/model/AbstractPinnedRepos.java | 14 +- .../ui/adapter/viewholder/LoginViewHolder.kt | 9 +- .../viewholder/ProfileOrgsViewHolder.java | 2 +- .../layout-sw600dp/login_row_item_menu.xml | 1 + .../layout-sw600dp/repos_row_item_menu.xml | 1 + .../layout/login_row_item_menu.xml | 1 + .../layout/repos_row_item_menu.xml | 1 + app/src/main/res/raw/changelog.html | 192 +++++++++--------- 11 files changed, 121 insertions(+), 115 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 24918dc95..b340be6b5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "com.fastaccess.github" minSdkVersion 21 targetSdkVersion 26 - versionCode 400 - versionName "4.0.0" + versionCode 401 + versionName "4.0.1" buildConfigString "GITHUB_CLIENT_ID", (buildProperties.secrets['github_client_id'] | buildProperties.notThere['github_client_id']).string buildConfigString "GITHUB_SECRET", (buildProperties.secrets['github_secret'] | buildProperties.notThere['github_secret']).string buildConfigString "IMGUR_CLIENT_ID", (buildProperties.secrets['imgur_client_id'] | buildProperties.notThere['imgur_client_id']).string diff --git a/app/src/main/java/com/fastaccess/App.java b/app/src/main/java/com/fastaccess/App.java index 484f883d8..ebcbce2f9 100644 --- a/app/src/main/java/com/fastaccess/App.java +++ b/app/src/main/java/com/fastaccess/App.java @@ -7,7 +7,6 @@ import com.crashlytics.android.Crashlytics; import com.crashlytics.android.core.CrashlyticsCore; import com.fastaccess.data.dao.model.Models; -import com.fastaccess.data.dao.model.PinnedRepos; import com.fastaccess.helper.TypeFaceHelper; import com.fastaccess.provider.colors.ColorsProvider; import com.fastaccess.provider.emoji.EmojiManager; @@ -57,9 +56,6 @@ private void init() { Shortbread.create(this); EmojiManager.load(); ColorsProvider.load(); - if (BuildConfig.VERSION_CODE != 320) { - PinnedRepos.migrateToVersion4(); - } } private void initFabric() { @@ -84,7 +80,7 @@ private void setupPreference() { public ReactiveEntityStore getDataStore() { if (dataStore == null) { EntityModel model = Models.DEFAULT; - DatabaseSource source = new DatabaseSource(this, model, "FastHub-DB", 10); + DatabaseSource source = new DatabaseSource(this, model, "FastHub-DB", 11); Configuration configuration = source.getConfiguration(); if (BuildConfig.DEBUG) { source.setTableCreationMode(TableCreationMode.CREATE_NOT_EXISTS); diff --git a/app/src/main/java/com/fastaccess/data/dao/model/AbstractLogin.java b/app/src/main/java/com/fastaccess/data/dao/model/AbstractLogin.java index 28a159ad1..86a6c09c4 100644 --- a/app/src/main/java/com/fastaccess/data/dao/model/AbstractLogin.java +++ b/app/src/main/java/com/fastaccess/data/dao/model/AbstractLogin.java @@ -23,7 +23,7 @@ @Entity @NoArgsConstructor public abstract class AbstractLogin implements Parcelable { @Key long id; - @Column(unique = true) String login; + @Column String login; String avatarUrl; String gravatarId; String url; @@ -140,8 +140,7 @@ public static Observable onMultipleLogin(@NonNull Login userModel, bool App.getInstance().getDataStore() .toBlocking() .delete(Login.class) - .where(Login.ID.eq(userModel.getId()) - .or(Login.LOGIN.eq(userModel.getLogin()))) + .where(Login.ID.eq(userModel.getId())) .get() .value(); App.getInstance().getDataStore() diff --git a/app/src/main/java/com/fastaccess/data/dao/model/AbstractPinnedRepos.java b/app/src/main/java/com/fastaccess/data/dao/model/AbstractPinnedRepos.java index 9e1318eba..fc207ca8e 100644 --- a/app/src/main/java/com/fastaccess/data/dao/model/AbstractPinnedRepos.java +++ b/app/src/main/java/com/fastaccess/data/dao/model/AbstractPinnedRepos.java @@ -34,7 +34,7 @@ @Entity @NoArgsConstructor public abstract class AbstractPinnedRepos implements Parcelable { @Key @Generated long id; - @Column(unique = true) String repoFullName; + @Column(unique = false) String repoFullName; @Convert(RepoConverter.class) Repo pinnedRepo; @io.requery.Nullable int entryCount; @io.requery.Nullable String login; @@ -50,8 +50,11 @@ public static boolean pinUpin(@NonNull Repo repo) { pinned.setRepoFullName(repo.getFullName()); pinned.setLogin(Login.getUser().getLogin()); pinned.setPinnedRepo(repo); - App.getInstance().getDataStore().toBlocking().insert(pinned); - return true; + try { + App.getInstance().getDataStore().toBlocking().insert(pinned); + return true; + } catch (Exception ignored) {} + return false; } else { delete(pinnedRepos.getId()); return false; @@ -66,8 +69,9 @@ public static boolean pinUpin(@NonNull Repo repo) { } @Nullable public static PinnedRepos get(@NonNull String repoFullName) { - return App.getInstance().getDataStore().select(PinnedRepos.class) - .where(REPO_FULL_NAME.eq(repoFullName).and(LOGIN.eq(Login.getUser().getLogin()))) + return App.getInstance().getDataStore().toBlocking().select(PinnedRepos.class) + .where(REPO_FULL_NAME.eq(repoFullName).and(LOGIN.eq(Login.getUser().getLogin())) + .or(REPO_FULL_NAME.eq(repoFullName))) .get() .firstOrNull(); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt index 59adce661..85356e387 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt @@ -1,5 +1,7 @@ package com.fastaccess.ui.adapter.viewholder +import android.annotation.SuppressLint +import android.net.Uri import android.view.View import android.view.ViewGroup import com.fastaccess.R @@ -20,9 +22,14 @@ class LoginViewHolder private constructor(itemView: View, adapter: BaseRecyclerA val avatarLayout: AvatarLayout? by bindOptionalView(R.id.avatarLayout) val title: FontTextView by bindView(R.id.title) + @SuppressLint("SetTextI18n") override fun bind(login: Login) { avatarLayout?.setUrl(login.avatarUrl, null, false, false) - title.text = login.login + title.text = if (login.isIsEnterprise) { + "${login.login} ${Uri.parse(login.enterpriseUrl).authority}" + } else { + login.login + } } companion object { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ProfileOrgsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ProfileOrgsViewHolder.java index f10830828..ab58f0733 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ProfileOrgsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ProfileOrgsViewHolder.java @@ -36,6 +36,6 @@ public static ProfileOrgsViewHolder newInstance(@NonNull ViewGroup parent) { @Override public void bind(@NonNull User user) { name.setText(user.getLogin()); - avatarLayout.setUrl(user.getAvatarUrl(), user.getLogin(), true, LinkParserHelper.isEnterprise(user.getHtmlUrl())); + avatarLayout.setUrl(user.getAvatarUrl(), user.getLogin(), true, LinkParserHelper.isEnterprise(user.getUrl())); } } diff --git a/app/src/main/res/layouts/row_layouts/layout-sw600dp/login_row_item_menu.xml b/app/src/main/res/layouts/row_layouts/layout-sw600dp/login_row_item_menu.xml index f7fd372ed..3a01767da 100644 --- a/app/src/main/res/layouts/row_layouts/layout-sw600dp/login_row_item_menu.xml +++ b/app/src/main/res/layouts/row_layouts/layout-sw600dp/login_row_item_menu.xml @@ -9,6 +9,7 @@ android:background="?selectableItemBackground" android:ellipsize="end" android:maxLines="1" + android:minHeight="48dp" android:paddingBottom="@dimen/spacing_normal" android:paddingEnd="@dimen/spacing_xs_large" android:paddingStart="@dimen/keyline_1" diff --git a/app/src/main/res/layouts/row_layouts/layout-sw600dp/repos_row_item_menu.xml b/app/src/main/res/layouts/row_layouts/layout-sw600dp/repos_row_item_menu.xml index 05aa944df..ba1b9e6ef 100644 --- a/app/src/main/res/layouts/row_layouts/layout-sw600dp/repos_row_item_menu.xml +++ b/app/src/main/res/layouts/row_layouts/layout-sw600dp/repos_row_item_menu.xml @@ -10,6 +10,7 @@ android:background="?selectableItemBackground" android:ellipsize="end" android:maxLines="1" + android:minHeight="48dp" android:paddingBottom="@dimen/spacing_normal" android:paddingEnd="@dimen/spacing_xs_large" android:paddingStart="@dimen/keyline_1" diff --git a/app/src/main/res/layouts/row_layouts/layout/login_row_item_menu.xml b/app/src/main/res/layouts/row_layouts/layout/login_row_item_menu.xml index 9cf2c5559..08edd88b6 100644 --- a/app/src/main/res/layouts/row_layouts/layout/login_row_item_menu.xml +++ b/app/src/main/res/layouts/row_layouts/layout/login_row_item_menu.xml @@ -9,6 +9,7 @@ android:background="?selectableItemBackground" android:ellipsize="end" android:maxLines="1" + android:minHeight="48dp" android:paddingBottom="@dimen/spacing_normal" android:paddingEnd="@dimen/spacing_xs_large" android:paddingStart="@dimen/keyline_1" diff --git a/app/src/main/res/layouts/row_layouts/layout/repos_row_item_menu.xml b/app/src/main/res/layouts/row_layouts/layout/repos_row_item_menu.xml index 3edf54415..c67f5043c 100644 --- a/app/src/main/res/layouts/row_layouts/layout/repos_row_item_menu.xml +++ b/app/src/main/res/layouts/row_layouts/layout/repos_row_item_menu.xml @@ -10,6 +10,7 @@ android:background="?selectableItemBackground" android:ellipsize="end" android:maxLines="1" + android:minHeight="48dp" android:paddingBottom="@dimen/spacing_normal" android:paddingEnd="@dimen/spacing_xs_large" android:paddingStart="@dimen/keyline_1" diff --git a/app/src/main/res/raw/changelog.html b/app/src/main/res/raw/changelog.html index 555ae28b8..db136c110 100644 --- a/app/src/main/res/raw/changelog.html +++ b/app/src/main/res/raw/changelog.html @@ -1,98 +1,94 @@ - - - - - Untitled Document.md - - - -

FastHub changelog -

-

Version 4.0.0 (Multiple Accounts, Enterprise & PR changes) -

-
-

Thanks to - @passsy & his company - @grandcentrix - for providing me with an Enterprise account in their server to ease implementing Enterprise support inFastHub. -

-
-
-

Thanks to - cookicons - for creating - FastHub - new icon. -

-
-
-

Thanks to - @dedepete - for helping out with CI & configuring nightly builds for - FastHub -

-
-

Bugs , Enhancements & new Features (4.0.0) -

-
    -
  • (New) Multiple Accounts
  • -
  • (New) Enterprise support
  • -
  • (New) PR review changes & on-line-number reviews
  • -
  • (New) Support to all merge strategies (Squash & Rebase)
  • -
  • (New) Comment on Commit file changes (on Code line number)
  • -
  • (New) Revamp of Branches & Tags, now its easy to differentiate between them
  • -
  • (New) Clicking on multiple Commits now will ask you which one to open.
  • -
  • (New) Now you can share links to FastHub from external Apps
  • -
  • (New) Showing owner & original poster in comments
  • -
  • (New) Custom code color palette
  • -
  • (New) Clicking on License should open its corresponding file
  • -
  • (New) Comment links are now copy-able thanks to (@eygraber)
  • -
  • (New) Pinned repos are now smart to sort your Pinned Repos by itself.
  • -
  • (New) Access your Repos from Menu Drawer
  • -
  • (New) Access your Starred Repos from Menu Drawer
  • -
  • (New) Showing the top most 5 accessed Pinned Repos in Menu Drawer
  • -
  • (New) - FastHub - now has Nightly builds thanks (@dedepete) -
  • -
  • (New) Disabling Issues Tab if Issues disabled in Repo.
  • -
  • (New) Added Share to Users & Organizations profiles
  • -
  • (New) Czech language thanks to (@hejsekvojtech)
  • -
  • (New) Spanish language thanks to (@alete)
  • -
  • (Enhancement) Opening FastHub from other Apps should open FastHub in new document thanks to (@eygraber)
  • -
  • (Enhancement) Wiki links
  • -
  • (Enhancement) Issue & PRs grammar
  • -
  • (Enhancement) Overall app layouts enhancements.
  • -
  • (Fix) Opening Submodule.
  • -
  • (Fix) Trending Language & today's stars.
  • -
  • (Fix) Code wrapping.
  • -
  • (Fix) PRs/Issues where the assigned user was a Team.
  • -
  • (Fix) Added back support for Local DB in some places
  • -
  • (Fix) Added Pagination to Branches & Tags.
  • -
  • (Fix) Traditional & Simplified Chinese language selector.
  • -
  • (Fix) Deep markdown images relative paths.
  • -
  • (Fix) Brought back fully zoom-out in code.
  • -
  • (Fix) More deeper file links parsing
  • -
  • (Fix) First Comment edited date.
  • -
  • (Fix) All notifications refresh isn’t disappeared.
  • -
  • (Fix) Readme progressbar
  • -
  • (Fix) Some crashes from the crash report.
  • -
  • (Fix) Lots of bug fixes
  • -
  • There are more stuff are not mentioned, find them out :p
  • -
-
-

P.S: FastHub is still in development mode, things will eventually come, rating FastHub 1 or 5 stars in Play store to request a new - feature or to report an issue they’ll be ignored, the best place to report issues/FRs are in GitHub issue ticket, you could go to - About & click on Report Issue and the issue will be posted directly to - FastHub repo. -

-
-
-

Thanks to everyone who contributed either via reporting bugs or via code contribution

-
-

- Thank you very much -

- - - \ No newline at end of file +

FastHub changelog +

+

Version 4.0.1 (Multiple Accounts, Enterprise & PR changes) +

+
+

Thanks to + @passsy & his company + @grandcentrix + for providing me with an Enterprise account in their server to ease implementing Enterprise support in   FastHub. +

+
+
+

Thanks to + cookicons + for creating + FastHub + new icon. +

+
+
+

Thanks to + @dedepete + for helping out with CI & configuring nightly builds for + FastHub +

+
+

Bugs , Enhancements & new Features (4.0.1 & 4.0.0) +

+
    +
  • (4.0.1 Fix) Pinned repos crashes
  • +
  • (4.0.1 Fix) Multiple Accounts (if enterprise account login is same as GitHub) thanks   + @passsy +
  • +
  • (New) Multiple Accounts
  • +
  • (New) Enterprise support
  • +
  • (New) PR review changes & on-line-number reviews
  • +
  • (New) Support to all merge strategies (Squash & Rebase)
  • +
  • (New) Comment on Commit file changes (on Code line number)
  • +
  • (New) Revamp of Branches & Tags, now its easy to differentiate between them
  • +
  • (New) Clicking on multiple Commits now will ask you which one to open.
  • +
  • (New) Now you can share links to FastHub from external Apps
  • +
  • (New) Showing owner & original poster in comments
  • +
  • (New) Custom code color palette
  • +
  • (New) Clicking on License should open its corresponding file
  • +
  • (New) Comment links are now copy-able thanks to (@eygraber)
  • +
  • (New) Pinned repos are now smart to sort your Pinned Repos by itself.
  • +
  • (New) Access your Repos from Menu Drawer
  • +
  • (New) Access your Starred Repos from Menu Drawer
  • +
  • (New) Showing the top most 5 accessed Pinned Repos in Menu Drawer
  • +
  • (New) + FastHub + now has Nightly builds thanks (@dedepete) +
  • +
  • (New) Disabling Issues Tab if Issues disabled in Repo.
  • +
  • (New) Added Share to Users & Organizations profiles
  • +
  • (New) Czech language thanks to (@hejsekvojtech)
  • +
  • (New) Spanish language thanks to (@alete)
  • +
  • (Enhancement) Opening FastHub from other Apps should open FastHub in new document thanks to (@eygraber)
  • +
  • (Enhancement) Wiki links
  • +
  • (Enhancement) Issue & PRs grammar
  • +
  • (Enhancement) Overall app layouts enhancements.
  • +
  • (Fix) Opening Submodule.
  • +
  • (Fix) Trending Language & today's stars.
  • +
  • (Fix) Code wrapping.
  • +
  • (Fix) PRs/Issues where the assigned user was a Team.
  • +
  • (Fix) Added back support for Local DB in some places
  • +
  • (Fix) Added Pagination to Branches & Tags.
  • +
  • (Fix) Traditional & Simplified Chinese language selector.
  • +
  • (Fix) Deep markdown images relative paths.
  • +
  • (Fix) Brought back fully zoom-out in code.
  • +
  • (Fix) More deeper file links parsing
  • +
  • (Fix) First Comment edited date.
  • +
  • (Fix) All notifications refresh isn’t disappeared.
  • +
  • (Fix) Readme progressbar
  • +
  • (Fix) Some crashes from the crash report.
  • +
  • (Fix) Lots of bug fixes
  • +
  • There are more stuff are not mentioned, find them out :p
  • +
+
+

P.S: FastHub is still in development mode, things will eventually come, rating FastHub 1 or 5 stars in Play store to request a new + feature or to report an issue they’ll be ignored, the best place to report issues/FRs are in GitHub issue ticket, you could go to + About & click on + Report Issue + and the issue will be posted directly to + FastHub + repo. +

+
+
+

Thanks to everyone who contributed either via reporting bugs or via code contribution

+
+

+ Thank you very much +

\ No newline at end of file