release 4.0.1

This commit is contained in:
kosh 2017-07-16 23:27:09 +08:00
parent 7b89d1ecd2
commit 4d6ff4fa49
11 changed files with 121 additions and 115 deletions

View File

@ -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

View File

@ -7,7 +7,6 @@ import android.support.v7.preference.PreferenceManager;
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 @@ public class App extends Application {
Shortbread.create(this);
EmojiManager.load();
ColorsProvider.load();
if (BuildConfig.VERSION_CODE != 320) {
PinnedRepos.migrateToVersion4();
}
}
private void initFabric() {
@ -84,7 +80,7 @@ public class App extends Application {
public ReactiveEntityStore<Persistable> 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);

View File

@ -23,7 +23,7 @@ import lombok.NoArgsConstructor;
@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 @@ import lombok.NoArgsConstructor;
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()

View File

@ -34,7 +34,7 @@ import static com.fastaccess.data.dao.model.PinnedRepos.REPO_FULL_NAME;
@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 @@ import static com.fastaccess.data.dao.model.PinnedRepos.REPO_FULL_NAME;
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 @@ import static com.fastaccess.data.dao.model.PinnedRepos.REPO_FULL_NAME;
}
@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();
}

View File

@ -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 {

View File

@ -36,6 +36,6 @@ public class ProfileOrgsViewHolder extends BaseViewHolder<User> {
@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()));
}
}

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -1,98 +1,94 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document.md</title>
<style></style>
</head>
<body id="preview">
<h2><a id="FastHub_changelog_0"></a>FastHub changelog
</h2>
<h4><a id="Version__400_Multiple_Accounts_Enterprise__PR_changes_2"></a>Version 4.0.0 (Multiple Accounts, Enterprise &amp; PR changes)
</h4>
<blockquote>
<p>Thanks to
<a href="https://github.com/passsy">@passsy</a> &amp; his company
<a href="https://github.com/grandcentrix">@grandcentrix</a>
for providing me with an Enterprise account in their server to ease implementing Enterprise support in<strong>FastHub</strong>.
</p>
</blockquote>
<blockquote>
<p>Thanks to
<a href="https://cookicons.co">cookicons</a>
for creating
<strong>FastHub</strong>
new icon.
</p>
</blockquote>
<blockquote>
<p>Thanks to
<a href="https://github.com/dedepete">@dedepete</a>
for helping out with CI &amp; configuring nightly builds for
<strong>FastHub</strong>
</p>
</blockquote>
<h4><a id="Bugs__Enhancements__new_Features_400_10"></a>Bugs , Enhancements &amp; new Features (4.0.0)
</h4>
<ul>
<li>(New) Multiple Accounts</li>
<li>(New) Enterprise support</li>
<li>(New) PR review changes &amp; on-line-number reviews</li>
<li>(New) Support to all merge strategies (Squash &amp; Rebase)</li>
<li>(New) Comment on Commit file changes (on Code line number)</li>
<li>(New) Revamp of Branches &amp; Tags, now its easy to differentiate between them</li>
<li>(New) Clicking on multiple Commits now will ask you which one to open.</li>
<li>(New) Now you can share links to FastHub from external Apps</li>
<li>(New) Showing owner &amp; original poster in comments</li>
<li>(New) Custom code color palette</li>
<li>(New) Clicking on License should open its corresponding file</li>
<li>(New) Comment links are now copy-able thanks to (@eygraber)</li>
<li>(New) Pinned repos are now smart to sort your Pinned Repos by itself.</li>
<li>(New) Access your Repos from Menu Drawer</li>
<li>(New) Access your Starred Repos from Menu Drawer</li>
<li>(New) Showing the top most 5 accessed Pinned Repos in Menu Drawer</li>
<li>(New)
<strong>FastHub</strong>
now has Nightly builds thanks (@dedepete)
</li>
<li>(New) Disabling Issues Tab if Issues disabled in Repo.</li>
<li>(New) Added Share to Users &amp; Organizations profiles</li>
<li>(New) Czech language thanks to (@hejsekvojtech)</li>
<li>(New) Spanish language thanks to (@alete)</li>
<li>(Enhancement) Opening FastHub from other Apps should open FastHub in new document thanks to (@eygraber)</li>
<li>(Enhancement) Wiki links</li>
<li>(Enhancement) Issue &amp; PRs grammar</li>
<li>(Enhancement) Overall app layouts enhancements.</li>
<li>(Fix) Opening Submodule.</li>
<li>(Fix) Trending Language &amp; today's stars.</li>
<li>(Fix) Code wrapping.</li>
<li>(Fix) PRs/Issues where the assigned user was a Team.</li>
<li>(Fix) Added back support for Local DB in some places</li>
<li>(Fix) Added Pagination to Branches &amp; Tags.</li>
<li>(Fix) Traditional &amp; Simplified Chinese language selector.</li>
<li>(Fix) Deep markdown images relative paths.</li>
<li>(Fix) Brought back fully zoom-out in code.</li>
<li>(Fix) More deeper file links parsing</li>
<li>(Fix) First Comment edited date.</li>
<li>(Fix) All notifications refresh isnt disappeared.</li>
<li>(Fix) Readme progressbar</li>
<li>(Fix) Some crashes from the crash report.</li>
<li>(Fix) Lots of bug fixes</li>
<li>There are more stuff are not mentioned, find them out :p</li>
</ul>
<blockquote>
<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 theyll be ignored, the best place to report issues/FRs are in GitHub issue ticket, you could go to
<em>About</em> &amp; click on <em>Report Issue</em> and the issue will be posted directly to
<strong>FastHub</strong> repo.
</p>
</blockquote>
<blockquote>
<p>Thanks to everyone who contributed either via reporting bugs or via code contribution</p>
</blockquote>
<p>
<strong>Thank you very much</strong>
</p>
</body>
</html>
<h2><a id="FastHub_changelog_0"></a>FastHub changelog
</h2>
<h4><a id="Version__400_Multiple_Accounts_Enterprise__PR_changes_2"></a>Version 4.0.1 (Multiple Accounts, Enterprise &amp; PR changes)
</h4>
<blockquote>
<p>Thanks to
<a href="https://github.com/passsy">@passsy</a> &amp; his company
<a href="https://github.com/grandcentrix">@grandcentrix</a>
for providing me with an Enterprise account in their server to ease implementing Enterprise support in &nbsp; <strong>FastHub</strong>.
</p>
</blockquote>
<blockquote>
<p>Thanks to
<a href="https://cookicons.co">cookicons</a>
for creating
<strong>FastHub</strong>
new icon.
</p>
</blockquote>
<blockquote>
<p>Thanks to
<a href="https://github.com/dedepete">@dedepete</a>
for helping out with CI &amp; configuring nightly builds for
<strong>FastHub</strong>
</p>
</blockquote>
<h4><a id="Bugs__Enhancements__new_Features_400_10"></a>Bugs , Enhancements &amp; new Features (4.0.1 & 4.0.0)
</h4>
<ul>
<li>(4.0.1 Fix) Pinned repos crashes</li>
<li>(4.0.1 Fix) Multiple Accounts (if enterprise account login is same as GitHub) thanks &nbsp;
<a href="https://github.com/passsy">@passsy</a>
</li>
<li>(New) Multiple Accounts</li>
<li>(New) Enterprise support</li>
<li>(New) PR review changes &amp; on-line-number reviews</li>
<li>(New) Support to all merge strategies (Squash &amp; Rebase)</li>
<li>(New) Comment on Commit file changes (on Code line number)</li>
<li>(New) Revamp of Branches &amp; Tags, now its easy to differentiate between them</li>
<li>(New) Clicking on multiple Commits now will ask you which one to open.</li>
<li>(New) Now you can share links to FastHub from external Apps</li>
<li>(New) Showing owner &amp; original poster in comments</li>
<li>(New) Custom code color palette</li>
<li>(New) Clicking on License should open its corresponding file</li>
<li>(New) Comment links are now copy-able thanks to (@eygraber)</li>
<li>(New) Pinned repos are now smart to sort your Pinned Repos by itself.</li>
<li>(New) Access your Repos from Menu Drawer</li>
<li>(New) Access your Starred Repos from Menu Drawer</li>
<li>(New) Showing the top most 5 accessed Pinned Repos in Menu Drawer</li>
<li>(New)
<strong>FastHub</strong>
now has Nightly builds thanks (@dedepete)
</li>
<li>(New) Disabling Issues Tab if Issues disabled in Repo.</li>
<li>(New) Added Share to Users &amp; Organizations profiles</li>
<li>(New) Czech language thanks to (@hejsekvojtech)</li>
<li>(New) Spanish language thanks to (@alete)</li>
<li>(Enhancement) Opening FastHub from other Apps should open FastHub in new document thanks to (@eygraber)</li>
<li>(Enhancement) Wiki links</li>
<li>(Enhancement) Issue &amp; PRs grammar</li>
<li>(Enhancement) Overall app layouts enhancements.</li>
<li>(Fix) Opening Submodule.</li>
<li>(Fix) Trending Language &amp; today's stars.</li>
<li>(Fix) Code wrapping.</li>
<li>(Fix) PRs/Issues where the assigned user was a Team.</li>
<li>(Fix) Added back support for Local DB in some places</li>
<li>(Fix) Added Pagination to Branches &amp; Tags.</li>
<li>(Fix) Traditional &amp; Simplified Chinese language selector.</li>
<li>(Fix) Deep markdown images relative paths.</li>
<li>(Fix) Brought back fully zoom-out in code.</li>
<li>(Fix) More deeper file links parsing</li>
<li>(Fix) First Comment edited date.</li>
<li>(Fix) All notifications refresh isnt disappeared.</li>
<li>(Fix) Readme progressbar</li>
<li>(Fix) Some crashes from the crash report.</li>
<li>(Fix) Lots of bug fixes</li>
<li>There are more stuff are not mentioned, find them out :p</li>
</ul>
<blockquote>
<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 theyll be ignored, the best place to report issues/FRs are in GitHub issue ticket, you could go to
<em>About</em> &amp; click on
<em>Report Issue</em>
and the issue will be posted directly to
<strong>FastHub</strong>
repo.
</p>
</blockquote>
<blockquote>
<p>Thanks to everyone who contributed either via reporting bugs or via code contribution</p>
</blockquote>
<p>
<strong>Thank you very much</strong>
</p>