-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/patch' into develop
- Loading branch information
Showing
43 changed files
with
591 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [wax911] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: wax911 # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
custom: # Replace with a single custom sponsorship URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"code": 108, | ||
"code": 111, | ||
"migration": false, | ||
"releaseNotes": "", | ||
"version": "1.4.4", | ||
"version": "1.4.7", | ||
"appId": "com.mxt.anitrend" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":108,"versionName":"1.4.4","enabled":true,"outputFile":"anitrend_v1.4.4_rc_108.apk","fullName":"release","baseName":"release"},"path":"anitrend_v1.4.4_rc_108.apk","properties":{}}] | ||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":111,"versionName":"1.4.7","enabled":true,"outputFile":"anitrend_v1.4.7_rc_111.apk","fullName":"release","baseName":"release"},"path":"anitrend_v1.4.7_rc_111.apk","properties":{}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 0 additions & 66 deletions
66
app/src/main/java/com/mxt/anitrend/base/custom/glide/GlideAppModule.java
This file was deleted.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
app/src/main/java/com/mxt/anitrend/base/custom/glide/GlideAppModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package com.mxt.anitrend.base.custom.glide | ||
|
||
import android.content.Context | ||
import com.bumptech.glide.GlideBuilder | ||
import com.bumptech.glide.annotation.GlideModule | ||
import com.bumptech.glide.load.DecodeFormat | ||
import com.bumptech.glide.load.engine.DiskCacheStrategy | ||
import com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool | ||
import com.bumptech.glide.load.engine.cache.ExternalPreferredCacheDiskCacheFactory | ||
import com.bumptech.glide.load.engine.cache.LruResourceCache | ||
import com.bumptech.glide.load.engine.cache.MemorySizeCalculator | ||
import com.bumptech.glide.module.AppGlideModule | ||
import com.bumptech.glide.request.RequestOptions | ||
import com.mxt.anitrend.R | ||
import com.mxt.anitrend.util.CompatUtil | ||
import com.mxt.anitrend.util.KeyUtil | ||
|
||
/** | ||
* Created by max on 2017/06/10. | ||
* Glide custom module | ||
*/ | ||
@GlideModule | ||
class GlideAppModule : AppGlideModule() { | ||
|
||
/** | ||
* If you’ve already migrated to the Glide v4 AppGlideModule and LibraryGlideModule, you can disable manifest parsing entirely. | ||
* Doing so can improve the initial startup time of Glide and avoid some potential problems with trying to parse metadata. | ||
* To disable manifest parsing, override the isManifestParsingEnabled() method in your AppGlideModule implementation: | ||
*/ | ||
override fun isManifestParsingEnabled(): Boolean { | ||
return false | ||
} | ||
|
||
override fun applyOptions(context: Context, builder: GlideBuilder) { | ||
val isLowRamDevice = CompatUtil.isLowRamDevice(context) | ||
|
||
val calculator = MemorySizeCalculator.Builder(context) | ||
.setMemoryCacheScreens((if (isLowRamDevice) 1 else 2).toFloat()).build() | ||
|
||
// Increasing cache & pool by 25% - default is 250MB | ||
val memoryCacheSize = (1.25 * calculator.memoryCacheSize).toInt() | ||
val bitmapPoolSize = (1.25 * calculator.bitmapPoolSize).toInt() | ||
var storageCacheSize = 1024 * 1024 * 350 | ||
if (context.externalCacheDir != null) { | ||
val total = context.externalCacheDir!!.totalSpace | ||
storageCacheSize = (total * 0.2).toInt() | ||
} | ||
|
||
builder.setMemoryCache(LruResourceCache(memoryCacheSize.toLong())) | ||
builder.setBitmapPool(LruBitmapPool(bitmapPoolSize.toLong())) | ||
builder.setDiskCache(ExternalPreferredCacheDiskCacheFactory(context, storageCacheSize.toLong())) | ||
|
||
// Setting default params for glide | ||
val options = RequestOptions() | ||
.format(if (isLowRamDevice) DecodeFormat.PREFER_RGB_565 else DecodeFormat.PREFER_ARGB_8888) | ||
.timeout(KeyUtil.GLIDE_REQUEST_TIMEOUT) | ||
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC) | ||
.error(CompatUtil.getDrawable(context, R.drawable.ic_emoji_sweat)) | ||
|
||
builder.setDefaultRequestOptions(options) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.