-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show all contributors from GitHub in settings,
Fixed bug when you couldn't play any media, Fixed browser crash, File picker for browser, Allow swiping down image preview to dismiss it, Implement SafeArgs in most places, Fixed pull request test build script, A little refactor for ui elements, Use icons instead of labels in the desktop toolbar, Escape special characters in strings.xml
- Loading branch information
1 parent
61d9f5e
commit 225acb4
Showing
92 changed files
with
564 additions
and
11,451 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
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
55 changes: 24 additions & 31 deletions
55
app/src/main/java/com/mrboomdev/awery/app/AweryGlideModule.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 |
---|---|---|
@@ -1,40 +1,33 @@ | ||
package com.mrboomdev.awery.app; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.bumptech.glide.Glide; | ||
import com.bumptech.glide.GlideBuilder; | ||
import com.bumptech.glide.Registry; | ||
import com.bumptech.glide.annotation.GlideModule; | ||
import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader; | ||
import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory; | ||
import com.bumptech.glide.load.model.GlideUrl; | ||
import com.bumptech.glide.module.AppGlideModule; | ||
import com.mrboomdev.awery.util.io.HttpClient; | ||
|
||
import java.io.InputStream; | ||
package com.mrboomdev.awery.app | ||
|
||
import android.content.Context | ||
import com.bumptech.glide.Glide | ||
import com.bumptech.glide.GlideBuilder | ||
import com.bumptech.glide.Registry | ||
import com.bumptech.glide.annotation.GlideModule | ||
import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader | ||
import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory | ||
import com.bumptech.glide.load.model.GlideUrl | ||
import com.bumptech.glide.module.AppGlideModule | ||
import com.mrboomdev.awery.util.io.HttpClient.client | ||
import java.io.InputStream | ||
|
||
@GlideModule | ||
public class AweryGlideModule extends AppGlideModule { | ||
|
||
@Override | ||
public void applyOptions(@NonNull Context context, @NonNull GlideBuilder builder) { | ||
super.applyOptions(context, builder); | ||
class AweryGlideModule : AppGlideModule() { | ||
override fun applyOptions(context: Context, builder: GlideBuilder) { | ||
super.applyOptions(context, builder) | ||
|
||
var diskCacheSizeBytes = 1024 * 1024 * 100; // 100 MiB | ||
builder.setDiskCache(new InternalCacheDiskCacheFactory(context, "img", diskCacheSizeBytes)); | ||
val diskCacheSizeBytes = 1024 * 1024 * 100 // 100 MiB | ||
builder.setDiskCache(InternalCacheDiskCacheFactory(context, "img", diskCacheSizeBytes.toLong())) | ||
} | ||
|
||
@Override | ||
public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) { | ||
override fun registerComponents(context: Context, glide: Glide, registry: Registry) { | ||
registry.replace( | ||
GlideUrl.class, | ||
InputStream.class, | ||
new OkHttpUrlLoader.Factory(HttpClient.getClient()) | ||
); | ||
GlideUrl::class.java, | ||
InputStream::class.java, | ||
OkHttpUrlLoader.Factory(client) | ||
) | ||
|
||
super.registerComponents(context, glide, registry); | ||
super.registerComponents(context, glide, registry) | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/mrboomdev/awery/app/data/settings/CustomSettingsItem.java
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
Oops, something went wrong.