diff --git a/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt b/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt index e7cb6ba4..3cb6cc4c 100644 --- a/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt +++ b/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt @@ -34,10 +34,8 @@ import androidx.core.view.setPadding import androidx.lifecycle.lifecycleScope import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions -import com.google.android.material.snackbar.Snackbar import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch -import org.pixeldroid.app.R import org.pixeldroid.app.databinding.FragmentCameraBinding import org.pixeldroid.app.postCreation.PostCreationActivity import org.pixeldroid.app.utils.BaseFragment @@ -109,7 +107,7 @@ class CameraFragment : BaseFragment() { thumbnail.setPadding(10) // Load thumbnail into circular button using Glide - Glide.with(thumbnail) + if(activity?.isDestroyed == false) Glide.with(thumbnail) .load(uri) .apply(RequestOptions.circleCropTransform()) .into(thumbnail) diff --git a/app/src/main/java/org/pixeldroid/app/profile/EditProfileActivity.kt b/app/src/main/java/org/pixeldroid/app/profile/EditProfileActivity.kt index d13c72af..239f3140 100644 --- a/app/src/main/java/org/pixeldroid/app/profile/EditProfileActivity.kt +++ b/app/src/main/java/org/pixeldroid/app/profile/EditProfileActivity.kt @@ -9,7 +9,6 @@ import android.view.View import androidx.activity.addCallback import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.viewModels -import androidx.core.view.GravityCompat import androidx.core.widget.doAfterTextChanged import androidx.lifecycle.Lifecycle import androidx.lifecycle.lifecycleScope