Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #17 from k0shk0sh/master
Browse files Browse the repository at this point in the history
applying commits
  • Loading branch information
failex234 committed Oct 9, 2017
2 parents 281625a + 522fa58 commit 7725b2b
Show file tree
Hide file tree
Showing 160 changed files with 2,564 additions and 8,531 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
/app/google-services.json
/app/build/
/app/src/main/res/values/secrets.xml
/app/fastaccess-key
/jobdispatcher/build/
/app/fastaccess-key
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Yet another **open-source** GitHub client app but unlike any other app, FastHub
alt="Direct apk download"
height="80">](https://github.com/k0shk0sh/FastHub/releases/latest)

# Features
## Features
- **App**
- Three login types (Basic Auth), (Access Token) or via (OAuth)
- Multiple Accounts
Expand All @@ -27,13 +27,15 @@ Yet another **open-source** GitHub client app but unlike any other app, FastHub
- Offline-mode
- Markdown and code highlighting support
- Notifications overview and "Mark all as read"
- Search users/orgs, repos, issues/prs & code.
- Search Users/Orgs, Repos, Issues/PRs & Code.
- FastHub & GitHub Pinned Repos
- Trending
- Wiki
- Projects
- **Repositories**
- Browse & Read Wiki
- Edit, Create & Delete files (commit)
- Edit, Create & Delete files (Project Columns Cards)
- Search Repos
- Browse and search Repos
- See your public, private and forked Repos
Expand Down Expand Up @@ -65,7 +67,7 @@ Yet another **open-source** GitHub client app but unlike any other app, FastHub
- Edit Gist & Gist Files
- React to Commit comments with reactions
- Comment on line number in Files/Code changes.
- **Orgs**
- **Organisations**
- Overview
- Feeds
- Teams & Teams repos
Expand All @@ -85,7 +87,7 @@ _Ads currently not available._
## Specs / Open-source libraries:

- Minimum **SDK 21**, _but AppCompat is used all the way ;-)_
- **Kotlin** all new modules starting from 2.5.3 will be written in **#Kotlin**.
- [**Kotlin**](https://github.com/JetBrains/kotlin) all new modules starting from 2.5.3 will be written in **#Kotlin**.
- **MVP**-architecture: [**ThirtyInch**](https://github.com/grandcentrix/ThirtyInch) because its ThirtyInch.
- [**RxJava2**](https://github.com/ReactiveX/RxJava) & [**RxAndroid**](https://github.com/ReactiveX/RxAndroid) for Retrofit & background threads
- [**Retrofit**](https://github.com/square/retrofit) for constructing the REST API
Expand All @@ -100,7 +102,7 @@ _Ads currently not available._
- [**Toasty**](https://github.com/GrenderG/Toasty) for displaying error/success messages
- [**ShapedImageView**](https://github.com/gavinliu/ShapedImageView) for round avatars
- [**Material-About-Library**](https://github.com/daniel-stoneuk/material-about-library) for the about screen
- **Fabric** analytics & crash reporting.
- [**Fabric**](https://fabric.io/kits/android/crashlytics) analytics & crash reporting.
- **Android Support Libraries**, the almighty ;-)

## Contribution
Expand All @@ -113,6 +115,7 @@ Read the [**contribution guide**](.github/CONTRIBUTING.md) for more detailed inf

<details>
<summary>Thanks for those who contributed to FastHub by adding their language</summary>
<p>- Chinese (Simplified) <a href="https://github.com/devifish">@Devifish</a></p>
<p>- Chinese (Traditional) <a href="https://github.com/maple3142">@maple3142</a></p>
<p>- German <a href="https://github.com/failex234">@failex234</a></p>
Expand All @@ -126,6 +129,7 @@ Read the [**contribution guide**](.github/CONTRIBUTING.md) for more detailed inf
<p>- Czech <a href="https://github.com/hejsekvojtech">@hejsekvojtech</a></p>
<p>- Spanish <a href="https://github.com/alete89">@alete89</a></p>
<p>- French <a href="https://github.com/ptt-homme">@ptt-homme</a></p>
<p>- Korean <a href="https://github.com/Astro36">@Astro36</a> <a href="https://github.com/cozyplanes">@cozyplanes</a></p>
</details>

## FAQ
Expand All @@ -137,21 +141,33 @@ Read the [**contribution guide**](.github/CONTRIBUTING.md) for more detailed inf
</details>

<details>
<summary>I tried to login via Access Token & OTP but it does not work?</summary>
<summary>I tried to login via Access Token & OTP but why isn't it working?</summary>
<p>You can't login via Access Token & OTP all together due to the lifetime of the OTP code, you'll be required to login in every few seconds.</p>
</details>

<details>
<summary>Why my Private Repo Wiki does not show up?</summary>
<summary>Why are my Private Repo and Enterprise Wiki not showing up?</summary>
<p>It's due to FastHub scraping GitHub Wiki page & Private Repos require session token that FastHub doesn't have.</p>
</details>

<details>
<summary>I login with Enterprise account but can't interact with anything other than my Enterprise GitHub</summary>
<p>Well, logically, you can't access anything else other than your Enterprise, but FastHub made that possible but can't do much about it,
in most cases since your login credential doesn't exists in GitHub server. But in <b>few</b>
cases your GitHub account Oauth token will do the trick.</p>
<summary>I login with Enterprise account but can't interact with anything other than my Enterprise GitHub.</summary>
<p>Well, logically, you can't access anything else other than your Enterprise, but FastHub made that possible but can't do much about it, in most cases since your login credential doesn't exists in GitHub server. But in <b>few</b> cases your GitHub account Oauth token will do the trick.</p>
</details>

<details>
<summary>Why am I having problems editing Issues/PRs?</summary>
<p>If you are unable to edit an issue in a public organization, please contact your Organization Admin to grant access to FastHub. Alternatively you can login using an Access Token with the correct permissions granted.</p>
</details>

<details>
<summary>I'm having this issue! / I want this and that!</summary>
<p>Head to https://github.com/k0shk0sh/FastHub/issues/new and create new issue for bugs or feature requests. I really encourage you to search before opening a ticket. Any duplicate request will result in it being closed immediately.</p>
</details>

<details>
<summary>How do I get PROMO CODE?</summary>
<p>Please refer to the in-app FAQ for details.</p>
</details>


Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ android {
}
}
compileSdkVersion 26
buildToolsVersion "26.0.1"
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.fastaccess.github"
minSdkVersion 21
targetSdkVersion 26
versionCode 420
versionName "4.2.0"
versionCode 441
versionName "4.4.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
Expand Down Expand Up @@ -167,7 +167,7 @@ dependencies {
implementation 'com.jaredrummler:android-device-names:1.1.4'
implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
implementation 'com.airbnb.android:lottie:2.2.0'
implementation project(path: ':jobdispatcher')
implementation 'com.firebase:firebase-jobdispatcher:0.8.2'
compileOnly "org.projectlombok:lombok:${lombokVersion}"
kapt "org.projectlombok:lombok:${lombokVersion}"
kapt "com.evernote:android-state-processor:${state_version}"
Expand Down
21 changes: 15 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,6 @@
android:configChanges="keyboard|orientation|screenSize"
android:theme="@style/ThemeTranslucent"/>

<activity
android:name=".ui.modules.reviews.changes.ReviewChangesActivity"
android:configChanges="keyboard|orientation|screenSize"
android:label="@string/review_changes"
android:theme="@style/ThemeTranslucent"/>

<activity
android:name=".ui.modules.repos.wiki.WikiActivity"
android:label="@string/gollum"
Expand Down Expand Up @@ -258,6 +252,21 @@
android:value=".ui.modules.repos.RepoPagerActivity"/>
</activity>

<activity
android:name=".ui.modules.profile.org.project.OrgProjectActivity"
android:label="@string/projects"
android:parentActivityName=".ui.modules.user.UserPagerActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.modules.user.UserPagerActivity"/>
</activity>

<activity android:name=".ui.modules.main.playstore.PlayStoreWarningActivity"/>

<activity
android:name=".ui.modules.repos.pull_requests.pull_request.details.files.fullscreen.FullScreenFileChangeActivity"
android:configChanges="keyboard|orientation|screenSize"/>


<activity
android:name=".ui.modules.parser.LinksParserActivity"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/md/github_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ body kbd {
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #656d78;
color: #fff;
vertical-align: middle;
border: solid 1px #656d78;
border-bottom-color: #bbb;
Expand Down
65 changes: 65 additions & 0 deletions app/src/main/graphql/github/RepoProject.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ repository(owner: $owner, name: $name) {
edges {
cursor
}
pageInfo {
hasNextPage
startCursor
endCursor
}
nodes {
name
number
Expand All @@ -27,6 +32,66 @@ repository(owner: $owner, name: $name) {
edges {
cursor
}
pageInfo {
hasNextPage
startCursor
endCursor
}
nodes {
name
number
body
createdAt
id
viewerCanUpdate
columns(first: 1) {
totalCount
}
databaseId
}
}
}
}

query orgProjectsOpen($owner: String!, $page: String) {
organization(login: $owner) {
projects(first: 30, states: OPEN, after: $page, orderBy: {field: CREATED_AT, direction: DESC}) {
totalCount
edges {
cursor
}
pageInfo {
hasNextPage
startCursor
endCursor
}
nodes {
name
number
body
createdAt
id
viewerCanUpdate
columns(first: 1) {
totalCount
}
databaseId
}
}
}
}
query orgProjectsClosed($owner: String!, $page: String) {
organization(login: $owner) {
projects(first: 30, states: CLOSED, after: $page, orderBy: {field: CREATED_AT, direction: DESC}) {
totalCount
edges {
cursor
}
pageInfo {
hasNextPage
startCursor
endCursor
}
nodes {
name
number
Expand Down
11 changes: 9 additions & 2 deletions app/src/main/java/com/fastaccess/data/dao/CommitFileChanges.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

private CommitFileChanges() {}

public static Observable<CommitFileChanges> constructToObservable(@Nullable List<CommitFileModel> files) {
public static Observable<CommitFileChanges> constructToObservable(@Nullable ArrayList<CommitFileModel> files) {
if (files == null || files.isEmpty()) return Observable.empty();
return Observable.fromIterable(files).map(CommitFileChanges::getCommitFileChanges);
return Observable.fromIterable(construct(files));
}

@NonNull public static List<CommitFileChanges> construct(@Nullable List<CommitFileModel> files) {
Expand Down Expand Up @@ -66,4 +66,11 @@ private CommitFileChanges(Parcel in) {

@Override public CommitFileChanges[] newArray(int size) {return new CommitFileChanges[size];}
};

public static boolean canAttachToBundle(CommitFileChanges model) {
Parcel parcel = Parcel.obtain();
model.writeToParcel(parcel, 0);
int size = parcel.dataSize();
return size < 600000;
}
}
85 changes: 80 additions & 5 deletions app/src/main/java/com/fastaccess/data/dao/CommitFileModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
import android.os.Parcel;
import android.os.Parcelable;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
* Created by Kosh on 01 Jan 2017, 9:00 PM
*/
@Getter @Setter @NoArgsConstructor
public class CommitFileModel implements Parcelable {

private String sha;
Expand Down Expand Up @@ -72,4 +67,84 @@ public class CommitFileModel implements Parcelable {
", patch='" + patch + '\'' +
'}';
}

public String getSha() {
return sha;
}

public void setSha(String sha) {
this.sha = sha;
}

public String getFilename() {
return filename;
}

public void setFilename(String filename) {
this.filename = filename;
}

public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}

public int getAdditions() {
return additions;
}

public void setAdditions(int additions) {
this.additions = additions;
}

public int getDeletions() {
return deletions;
}

public void setDeletions(int deletions) {
this.deletions = deletions;
}

public int getChanges() {
return changes;
}

public void setChanges(int changes) {
this.changes = changes;
}

public String getBlobUrl() {
return blobUrl;
}

public void setBlobUrl(String blobUrl) {
this.blobUrl = blobUrl;
}

public String getRawUrl() {
return rawUrl;
}

public void setRawUrl(String rawUrl) {
this.rawUrl = rawUrl;
}

public String getContentsUrl() {
return contentsUrl;
}

public void setContentsUrl(String contentsUrl) {
this.contentsUrl = contentsUrl;
}

public String getPatch() {
return patch;
}

public void setPatch(String patch) {
this.patch = patch;
}
}

0 comments on commit 7725b2b

Please sign in to comment.