Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-18.0] Bugfix/noid/fix save file dialog #3470

Merged
merged 2 commits into from
Nov 28, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import android.app.Dialog
import android.content.DialogInterface
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment
import androidx.work.Data
Expand All @@ -40,7 +37,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.nextcloud.talk.R
import com.nextcloud.talk.application.NextcloudTalkApplication
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
import com.nextcloud.talk.databinding.DialogChooseAccountShareToBinding
import com.nextcloud.talk.jobs.SaveFileToStorageWorker
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import java.util.concurrent.ExecutionException
Expand All @@ -51,8 +47,6 @@ class SaveToStorageDialogFragment : DialogFragment() {

@Inject
lateinit var viewThemeUtils: ViewThemeUtils
private var binding: DialogChooseAccountShareToBinding? = null
private var dialogView: View? = null
lateinit var fileName: String

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -88,24 +82,6 @@ class SaveToStorageDialogFragment : DialogFragment() {
return dialog
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
themeViews()
}

private fun themeViews() {
viewThemeUtils.platform.themeDialog(binding!!.root)
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return dialogView
}

override fun onDestroyView() {
super.onDestroyView()
binding = null
}

@SuppressLint("LongLogTag")
private fun saveImageToStorage(
fileName: String
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values-v27/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<item name="android:windowActionBar">true</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="colorSurface">@color/bg_default</item>
<item name="alertDialogTheme">@style/Theme.AppCompat.DayNight.Dialog</item>
<item name="android:alertDialogTheme">?alertDialogTheme</item>
</style>

<style name="FullScreenMediaTheme" parent="Theme.AppCompat.Light.NoActionBar">
Expand All @@ -19,5 +21,7 @@
<item name="android:windowActionBar">true</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="colorSurface">@color/bg_default</item>
<item name="alertDialogTheme">@style/Theme.AppCompat.DayNight.Dialog</item>
<item name="android:alertDialogTheme">?alertDialogTheme</item>
</style>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">true</item>
<item name="colorSurface">@color/bg_default</item>
<item name="alertDialogTheme">@style/Theme.AppCompat.DayNight.Dialog</item>
<item name="android:alertDialogTheme">?alertDialogTheme</item>
</style>

<style name="FullScreenMediaTheme" parent="Theme.AppCompat.Light.NoActionBar">
Expand All @@ -231,6 +233,8 @@
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">true</item>
<item name="colorSurface">@color/bg_default</item>
<item name="alertDialogTheme">@style/Theme.AppCompat.DayNight.Dialog</item>
<item name="android:alertDialogTheme">?alertDialogTheme</item>
</style>

<style name="TextInputLayoutTheme" parent="Theme.AppCompat">
Expand Down
Loading