Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,4 @@ jobs:
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# Generic
.DS_Store

.idea/
*.iml

**/build/
.vscode/
.*cache*
node_modules/
build/
dist/
out/
*.dll
*.exe
.gradle/
.kotlin/
captures/
app/debug
app/release

# App
local.properties
*.keystore
*.logcat
**/google-services.json
**/firebase-adminsdk.json

**/dist/
15 changes: 5 additions & 10 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# IDE
.idea/
.vscode/

# Build
**/dist/
**/node_modules/

# App
app/src/main/assets/preview/**
.github/assets
.github/disabled
.github/pull_request_template.md
.github/assets
app/src/main/assets/preview
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![GitHub Downloads](https://img.shields.io/github/downloads/django-files/android-client/total?logo=android)](https://github.com/django-files/android-client/releases/latest/download/app-release.apk)
[![GitHub Downloads](https://img.shields.io/github/downloads/django-files/android-client/total?logo=android)](https://github.com/django-files/android-client/releases)
[![GitHub Release Version](https://img.shields.io/github/v/release/django-files/android-client?logo=github)](https://github.com/django-files/android-client/releases/latest)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/django-files/android-client?logo=github&label=updated)](https://github.com/django-files/android-client/pulse)
[![Lint](https://img.shields.io/github/actions/workflow/status/django-files/android-client/lint.yaml?logo=github&logoColor=white&label=lint)](https://github.com/django-files/android-client/actions/workflows/lint.yaml)
[![Release](https://img.shields.io/github/actions/workflow/status/django-files/android-client/release.yaml?logo=github&logoColor=white&label=release)](https://github.com/django-files/android-client/actions/workflows/release.yaml)
[![APK Size](https://badges.cssnr.com/gh/release/django-files/android-client/latest/asset/app-release.apk/size?label=apk&color=darkgreen)](https://github.com/django-files/remote-wallpaper-android/releases/latest/download/app-release.apk)
[![AGP Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fdjango-files%2Fandroid-client%2Frefs%2Fheads%2Fmaster%2Fgradle%2Flibs.versions.toml&query=%24.versions.agp&logo=gradle&label=AGP)](https://github.com/django-files/android-client/blob/master/gradle/libs.versions.toml#L2)
[![Workflow Lint](https://img.shields.io/github/actions/workflow/status/django-files/android-client/lint.yaml?logo=norton&logoColor=white&label=lint)](https://github.com/django-files/android-client/actions/workflows/lint.yaml)
[![Workflow Release](https://img.shields.io/github/actions/workflow/status/django-files/android-client/release.yaml?logo=norton&logoColor=white&label=release)](https://github.com/django-files/android-client/actions/workflows/release.yaml)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/django-files/android-client?logo=listenhub&label=updated)](https://github.com/django-files/android-client/pulse)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/django-files/android-client?logo=buffer&label=repo%20size)](https://github.com/django-files/android-client?tab=readme-ov-file#readme)
[![GitHub Top Language](https://img.shields.io/github/languages/top/django-files/android-client?logo=devbox)](https://github.com/django-files/android-client?tab=readme-ov-file#readme)
Expand All @@ -17,7 +17,8 @@

# Django Files Android App

[![GitHub Release](https://img.shields.io/github/v/release/django-files/android-client?style=for-the-badge&logo=android&label=Download%20Android%20APK&color=3ddc84)](https://github.com/django-files/android-client/releases/latest/download/app-release.apk)
<a title="Django Files" href="https://django-files.github.io/" target="_blank">
<img alt="Django Files" align="right" width="128" height="auto" src="https://django-files.github.io/images/logo.png"></a>

- [Install](#Install)
- [Setup](#Setup)
Expand All @@ -38,6 +39,8 @@ The URL to the file is automatically copied to the clipboard and the preview is

Additional screenshots can be found on the website: https://django-files.github.io/android/

[![GitHub Release](https://img.shields.io/github/v/release/django-files/android-client?style=for-the-badge&logo=android&label=Download%20Android%20APK&color=3ddc84)](https://github.com/django-files/android-client/releases/latest/download/app-release.apk)

| Django&nbsp;Files | Link |
| ----------------- | :-------------------------------------------- |
| Website | https://django-files.github.io/ |
Expand Down Expand Up @@ -203,7 +206,6 @@ If you are experiencing an issue/bug or getting unexpected results, you can:

- Report an Issue: https://github.com/django-files/android-client/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=Django%20Files%20Android%20App)

# Development

Expand Down Expand Up @@ -342,10 +344,10 @@ You can also support other related projects:
- [Django Files Android App](https://github.com/django-files/android-client)
- [Django Files Web Extension](https://github.com/django-files/web-extension)

<a href="https://github.com/django-files/android-client/stargazers">
<a href="https://django-files.github.io/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=django-files/android-client&type=date&legend=bottom-right&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=django-files/android-client&type=date&legend=bottom-right" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=django-files/android-client&type=date&legend=bottom-right" />
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=django-files/django-files,django-files/ios-client,django-files/android-client,django-files/web-extension&type=date&theme=dark&legend=top-left" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=django-files/django-files,django-files/ios-client,django-files/android-client,django-files/web-extension&type=date&legend=top-left" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=django-files/django-files,django-files/ios-client,django-files/android-client,django-files/web-extension&type=date&legend=top-left" />
</picture>
</a>
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ tasks:
format:
desc: Format
aliases: [fmt]
cmd: |
prettier --write .
cmds:
- prettier --write .

build:
desc: Build (recommended android studio)
Expand Down
3 changes: 1 addition & 2 deletions app/src/debug/java/com/djangofiles/djangofiles/DiscordApi.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.djangofiles.djangofiles

import android.content.Context
import android.util.Log
import com.google.gson.GsonBuilder
import okhttp3.Cookie
import okhttp3.CookieJar
Expand Down Expand Up @@ -65,7 +64,7 @@ class DiscordApi(
.build()
}

inner class SimpleCookieJar : CookieJar {
class SimpleCookieJar : CookieJar {
private val cookieStore = mutableMapOf<String, List<Cookie>>()

override fun saveFromResponse(url: HttpUrl, cookies: List<Cookie>) {
Expand Down
13 changes: 10 additions & 3 deletions app/src/main/java/com/djangofiles/djangofiles/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import android.util.Log
import android.webkit.CookieManager
import android.widget.TextView
import android.widget.Toast
import androidx.activity.SystemBarStyle
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
Expand Down Expand Up @@ -101,7 +102,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Log.d("Main[onCreate]", "savedInstanceState: ${savedInstanceState?.size()}")
enableEdgeToEdge()
enableEdgeToEdge(
//statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
statusBarStyle = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT),

//navigationBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
navigationBarStyle = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT)
)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)

Expand Down Expand Up @@ -178,7 +185,7 @@ class MainActivity : AppCompatActivity() {
//preferences.registerOnSharedPreferenceChangeListener(listener)

// Update Status Bar
window.statusBarColor = Color.TRANSPARENT
//window.statusBarColor = Color.TRANSPARENT
//WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = false

// Set Global Left/Right System Insets
Expand All @@ -194,7 +201,7 @@ class MainActivity : AppCompatActivity() {
//window.decorView.setOnApplyWindowInsetsListener { view, insets -> insets }

// Update Navigation Bar
window.navigationBarColor = Color.TRANSPARENT
//window.navigationBarColor = Color.TRANSPARENT
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.setNavigationBarContrastEnforced(false)
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/djangofiles/djangofiles/ServerApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ class ServerApi(val context: Context, host: String) {
.build()
}

inner class SimpleCookieJar : CookieJar {
class SimpleCookieJar : CookieJar {
private val cookieStore = mutableMapOf<String, List<Cookie>>()

override fun saveFromResponse(url: HttpUrl, cookies: List<Cookie>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.app.Dialog
import android.app.DownloadManager
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.os.Environment
Expand All @@ -18,6 +17,7 @@ import android.widget.LinearLayout
import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import androidx.core.view.WindowCompat
import androidx.fragment.app.activityViewModels
import androidx.fragment.app.setFragmentResultListener
import androidx.lifecycle.lifecycleScope
Expand Down Expand Up @@ -60,7 +60,7 @@ class FilesBottomSheet : BottomSheetDialogFragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
): View {
_binding = FragmentFilesBottomBinding.inflate(inflater, container, false)
val root: View = binding.root
return root
Expand All @@ -78,12 +78,12 @@ class FilesBottomSheet : BottomSheetDialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val dialog = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
dialog.setOnShowListener {
dialog.window?.navigationBarColor = Color.TRANSPARENT
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
dialog.window?.setNavigationBarContrastEnforced(false)
dialog.window?.let { window ->
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.setNavigationBarContrastEnforced(false)
}
WindowCompat.setDecorFitsSystemWindows(window, false)
}
dialog.window?.decorView?.systemUiVisibility =
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
}
return dialog
}
Expand Down Expand Up @@ -210,12 +210,10 @@ class FilesBottomSheet : BottomSheetDialogFragment() {

// Image
val radius = requireContext().resources.getDimension(R.dimen.image_preview_large)
binding.imagePreview.setShapeAppearanceModel(
binding.imagePreview.shapeAppearanceModel
.toBuilder()
.setAllCorners(CornerFamily.ROUNDED, radius)
.build()
)
binding.imagePreview.shapeAppearanceModel = binding.imagePreview.shapeAppearanceModel
.toBuilder()
.setAllCorners(CornerFamily.ROUNDED, radius)
.build()
if (isGlideMime(data.mime)) {
Log.d("Bottom[onCreateView]", "isGlideMime")
Glide.with(this)
Expand Down
Loading
Loading