Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbWatershed committed Feb 15, 2023
2 parents 1adbb27 + 1b4564c commit 0789a3d
Show file tree
Hide file tree
Showing 199 changed files with 8,477 additions and 6,418 deletions.
17 changes: 11 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
minSdkVersion 21
targetSdkVersion 33
versionCode 130 // is updated automatically by BitRise; only used when building locally
versionName '1.17.3'
versionName '1.17.4'

def includeObjectBoxBrowser = System.getenv("INCLUDE_OBJECTBOX_BROWSER") ?: "false"
def includeLeakCanary = System.getenv("INCLUDE_LEAK_CANARY") ?: "false"
Expand Down Expand Up @@ -122,15 +122,18 @@ dependencies {
*/
// Support libraries
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.paging:paging-runtime:2.1.2'
implementation 'androidx.fragment:fragment-ktx:1.5.4'
implementation 'androidx.fragment:fragment-ktx:1.5.5'
implementation "androidx.documentfile:documentfile:1.0.1"
// <-- if documentfile is bumped, please examine FileExplorer for evolutions
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'androidx.core:core-ktx:1.9.0'

def android_work_version = '2.7.1'
implementation "androidx.work:work-runtime:$android_work_version"
implementation "androidx.work:work-runtime-ktx:$android_work_version"
Expand Down Expand Up @@ -162,6 +165,7 @@ dependencies {

// Animated PNG (apng) support -> https://github.com/penfeizhou/APNG4Android
implementation 'com.github.penfeizhou.android.animation:apng:2.24.0'
implementation 'com.github.penfeizhou.android.animation:gif:2.24.0'

// Animated GIF creator -> https://github.com/waynejo/android-ndk-gif
implementation 'io.github.waynejo:androidndkgif:1.0.1'
Expand Down Expand Up @@ -199,7 +203,7 @@ dependencies {
implementation "com.github.skydoves:submarine:1.0.7"

// Fast scroller
implementation 'me.zhanghai.android.fastscroll:library:1.1.8'
implementation 'me.zhanghai.android.fastscroll:library:1.2.0'

// Specific UI layout for tag mosaic : github.com/google/flexbox-layout
implementation 'com.google.android.flexbox:flexbox:3.0.0'
Expand Down Expand Up @@ -326,4 +330,5 @@ sonarqube {
}
}

apply plugin: 'io.objectbox' // apply last
apply plugin: 'io.objectbox'
apply plugin: 'org.jetbrains.kotlin.android'// apply last
4 changes: 3 additions & 1 deletion app/customssiv/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'org.jetbrains.kotlin.android'


android {
Expand Down Expand Up @@ -37,7 +38,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.appcompat:appcompat:1.6.0'
// Don't update exifinterface > 1.2.0 without testing library screen thumbs with large PNGs
// v1.3.2 is bugged when loading large PNGs through Glide
implementation 'androidx.exifinterface:exifinterface:1.2.0'
Expand All @@ -54,4 +55,5 @@ dependencies {

// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'androidx.core:core-ktx:+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ public CustomSubsamplingScaleImageView(@NonNull Context context, @Nullable Attri
}

quickScaleThreshold = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 80, context.getResources().getDisplayMetrics());
scaleDebouncer = new Debouncer<>(context, 200, scale -> {
if (scaleListener != null) scaleListener.accept(scale);
scaleDebouncer = new Debouncer<>(context, 200, scaleOut -> {
if (scaleListener != null) scaleListener.accept(scaleOut);
});
}

Expand Down Expand Up @@ -720,6 +720,7 @@ private void setGestureDetector(final Context context) {

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
// NB : Even though e1 and e2 are marked @NonNull on the overriden method, one of them may be actually null, hence the present implementation
if (panEnabled && readySent && vTranslate != null && e1 != null && e2 != null && (Math.abs(e1.getX() - e2.getX()) > 50 || Math.abs(e1.getY() - e2.getY()) > 50) && (Math.abs(velocityX) > 500 || Math.abs(velocityY) > 500) && !isZooming) {
PointF vTranslateEnd = new PointF(vTranslate.x + (velocityX * 0.25f), vTranslate.y + (velocityY * 0.25f));
float sCenterXEnd = ((getWidthInternal() / 2f) - vTranslateEnd.x) / scale;
Expand Down Expand Up @@ -2162,8 +2163,6 @@ private boolean needsRotating(int sWidth, int sHeight) {
}

private static class SingleImage {
// private int sampleSize;
// private Bitmap bitmap;
private float scale = 1;
private int rawWidth = -1;
private int rawHeight = -1;
Expand Down
15 changes: 8 additions & 7 deletions app/objectbox-models/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@
"type": 6,
"flags": 8
},
{
"id": "11:6249972361468615650",
"name": "storageFolder",
"type": 9
},
{
"id": "12:3838124773804113972",
"name": "favourite",
Expand Down Expand Up @@ -315,7 +310,7 @@
},
{
"id": "4:3086874109297661629",
"lastPropertyId": "4:1209356155950397260",
"lastPropertyId": "5:5044275535899232012",
"name": "QueueRecord",
"properties": [
{
Expand All @@ -336,6 +331,11 @@
"type": 11,
"flags": 520,
"relationTarget": "Content"
},
{
"id": "5:5044275535899232012",
"name": "frozen",
"type": 1
}
],
"relations": []
Expand Down Expand Up @@ -805,7 +805,8 @@
4015520791093060143,
5434514687553672562,
1209356155950397260,
5068971358681707507
5068971358681707507,
6249972361468615650
],
"retiredRelationUids": [
4182320255043105081,
Expand Down
11 changes: 5 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<!-- Required to install update packages when targeting API 29 or higher -->
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<!-- Required to fire notifications when targeting API 33 or higher -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:name=".core.HentoidApp"
Expand Down Expand Up @@ -55,9 +55,6 @@
<activity
android:name=".activities.IntroActivity"
android:label="@string/app_intro" />
<activity
android:name=".activities.Api29MigrationActivity"
android:label="@string/title_activity_api29_migration" />
<activity
android:name=".activities.sources.HitomiActivity"
android:configChanges="orientation|screenSize" />
Expand Down Expand Up @@ -209,6 +206,10 @@
android:name=".activities.RenamingRulesActivity"
android:label="@string/title_activity_rules"
tools:ignore="UnusedAttribute" />
<activity
android:name=".activities.StoragePreferenceActivity"
android:label="@string/title_activity_storage"
tools:ignore="UnusedAttribute" />
<activity
android:name=".activities.IntentActivity"
android:exported="true"
Expand Down Expand Up @@ -583,8 +584,6 @@

<service android:name=".services.UpdateCheckService" />

<service android:name=".services.API29MigrationService" />

<!-- Receivers -->

<receiver android:name=".receiver.DownloadNotificationDeleteReceiver" />
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/me/devsaki/hentoid/activities/AboutActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AboutActivity : BaseActivity() {
binding?.let {
setContentView(it.root)

it.toolbar.setNavigationOnClickListener { onBackPressed() }
it.toolbar.setNavigationOnClickListener { finish() }

it.appLogo.setOnClickListener { startBrowserActivity(Consts.URL_GITHUB_WIKI) }
it.githubText.setOnClickListener { startBrowserActivity(Consts.URL_GITHUB) }
Expand All @@ -44,10 +44,10 @@ class AboutActivity : BaseActivity() {
BuildConfig.VERSION_CODE
)
it.tvChromeVersionName.text =
if (WebkitPackageHelper.getWebViewAvailable())
getString(R.string.about_chrome_version, HttpHelper.getChromeVersion())
else
getString(R.string.about_chrome_unavailable)
if (WebkitPackageHelper.getWebViewAvailable())
getString(R.string.about_chrome_version, HttpHelper.getChromeVersion())
else
getString(R.string.about_chrome_unavailable)

it.changelogButton.setOnClickListener { showFragment(ChangelogFragment()) }

Expand Down
Loading

0 comments on commit 0789a3d

Please sign in to comment.