Skip to content

Commit

Permalink
Merge pull request #3470 from nextcloud/backport/3466/stable-18.0
Browse files Browse the repository at this point in the history
[stable-18.0] Bugfix/noid/fix save file dialog
  • Loading branch information
AndyScherzinger authored Nov 28, 2023
2 parents f8587e7 + 53f65c5 commit ed79a8c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
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

0 comments on commit ed79a8c

Please sign in to comment.