Skip to content

Commit

Permalink
Merge pull request #47 from kaczmarkiewiczp/dev
Browse files Browse the repository at this point in the history
Clean up and refactor code
  • Loading branch information
patrykcoding authored Apr 18, 2018
2 parents 0e804a9 + ca9e36c commit 41ca5aa
Show file tree
Hide file tree
Showing 49 changed files with 306 additions and 288 deletions.
2 changes: 1 addition & 1 deletion .idea/assetWizardSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "ca.pkay.rcloneexplorer"
minSdkVersion 21
targetSdkVersion 27
versionCode 3
versionName "0.3.0-alpha"
versionCode 4
versionName "1.0.0-beta"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down Expand Up @@ -36,6 +36,7 @@ dependencies {
implementation "com.mikepenz:iconics-core:3.0.3@aar"
implementation 'com.mikepenz:community-material-typeface:2.0.46.1@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.0.6.0@aar'
implementation 'com.mikepenz:octicons-typeface:3.2.0.4@aar'
implementation "com.mikepenz:aboutlibraries:6.0.8"
implementation 'us.feras.mdv:markdownview:1.1.0'
testImplementation 'junit:junit:4.12'
Expand Down
11 changes: 10 additions & 1 deletion app/src/main/assets/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
### Version 0.3.0-alpha
### 1.0.0-beta
***
First beta release!

* Code refactoring

***


### 0.3.0-alpha
***

* **New:** Changelog added under About screen
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/ca/pkay/rcloneexplorer/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,25 @@ private void showChangelog() {
private void showOpenSourceLibraries() {
new LibsBuilder()
.withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
.withActivityTitle("Credits/Libraries")
.withActivityTitle(getString(R.string.credits_libraries))
.withAutoDetect(false)
.withLibraries()
.withExcludedLibraries()
.start(this);
}

private void openAppGitHubLink() {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/kaczmarkiewiczp/rcloneExplorer"));
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.github_app_url)));
startActivity(browserIntent);
}

private void reportBug() {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/kaczmarkiewiczp/rcloneExplorer/issues/new"));
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.github_issue_url)));
startActivity(browserIntent);
}

private void openAuthorGitHubLink() {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/kaczmarkiewiczp"));
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.github_author_url)));
startActivity(browserIntent);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.content.Intent;

import ca.pkay.rcloneexplorer.Services.StreamingService;
import ca.pkay.rcloneexplorer.Services.UploadService;

public class ServeCancelAction extends BroadcastReceiver {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.content.Context;
import android.content.Intent;

import ca.pkay.rcloneexplorer.Services.DownloadService;
import ca.pkay.rcloneexplorer.Services.UploadService;

public class UploadCancelAction extends BroadcastReceiver {
Expand Down
32 changes: 4 additions & 28 deletions app/src/main/java/ca/pkay/rcloneexplorer/FileComparators.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@ public int compare(FileItem fileItem, FileItem t1) {
return fileItem.getName().compareTo(t1.getName());
}

if (fileItem.getSize() == t1.getSize()) {
return 0;
} else if (fileItem.getSize() > t1.getSize()) {
return -1;
} else {
return 1;
}
return Long.compare(t1.getSize(), fileItem.getSize());
}
}

Expand All @@ -72,13 +66,7 @@ public int compare(FileItem fileItem, FileItem t1) {
return fileItem.getName().compareTo(t1.getName());
}

if (fileItem.getSize() == t1.getSize()) {
return 0;
} else if (fileItem.getSize() > t1.getSize()) {
return 1;
} else {
return -1;
}
return Long.compare(fileItem.getSize(), t1.getSize());
}
}

Expand All @@ -92,13 +80,7 @@ public int compare(FileItem fileItem, FileItem t1) {
return 1;
}

if (fileItem.getModTime() == t1.getModTime()) {
return 0;
} else if (fileItem.getModTime() > t1.getModTime()) {
return -1;
} else {
return 1;
}
return Long.compare(t1.getModTime(), fileItem.getModTime());
}
}

Expand All @@ -112,13 +94,7 @@ public int compare(FileItem fileItem, FileItem t1) {
return 1;
}

if (fileItem.getModTime() == t1.getModTime()) {
return 0;
} else if (fileItem.getModTime() > t1.getModTime()) {
return 1;
} else {
return -1;
}
return Long.compare(fileItem.getModTime(), t1.getModTime());
}
}
}
Loading

0 comments on commit 41ca5aa

Please sign in to comment.