diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/views/AttachmentsView.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/views/AttachmentsView.kt index 354a8921..c981a4ba 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/views/AttachmentsView.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/views/AttachmentsView.kt @@ -37,9 +37,7 @@ class AttachmentsView @JvmOverloads constructor( } private val storageDir by lazy { - val storageDir = Environment.getExternalStoragePublicDirectory("Szkolny.eu") - storageDir.mkdirs() - storageDir + Utils.getStorageDir() } fun init(arguments: Bundle, owner: Any) { @@ -82,6 +80,7 @@ class AttachmentsView @JvmOverloads constructor( list.adapter = adapter list.apply { setHasFixedSize(false) + isNestedScrollingEnabled = false layoutManager = LinearLayoutManager(context) addItemDecoration(SimpleDividerItemDecoration(context)) } diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/utils/Utils.java b/app/src/main/java/pl/szczodrzynski/edziennik/utils/Utils.java index 910fc6f0..d4ffae05 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/utils/Utils.java +++ b/app/src/main/java/pl/szczodrzynski/edziennik/utils/Utils.java @@ -776,7 +776,8 @@ public class Utils { public static File getStorageDir() { if (storageDir != null) return storageDir; - storageDir = Environment.getExternalStoragePublicDirectory("Szkolny.eu"); + storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); + storageDir = new File(storageDir, "Szkolny.eu"); storageDir.mkdirs(); return storageDir; } diff --git a/app/src/main/res/layout/message_fragment.xml b/app/src/main/res/layout/message_fragment.xml index 1bae5bb5..2ca32c3d 100644 --- a/app/src/main/res/layout/message_fragment.xml +++ b/app/src/main/res/layout/message_fragment.xml @@ -57,7 +57,7 @@ android:visibility="visible" tools:visibility="gone"/> - - +