Skip to content

Commit

Permalink
feedback: safer database (fixes #3311) (#3316)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Mar 27, 2024
1 parent 29449b8 commit 27a8829
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1451
versionName "0.14.51"
versionCode 1452
versionName "0.14.52"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class FeedbackFragment : DialogFragment(), View.OnClickListener {
private lateinit var fragmentFeedbackBinding: FragmentFeedbackBinding
private lateinit var mRealm: Realm
private lateinit var databaseService: DatabaseService
private lateinit var model: RealmUserModel
private var model: RealmUserModel? = null
var user: String? = ""

interface OnFeedbackSubmittedListener {
Expand All @@ -45,8 +45,10 @@ class FeedbackFragment : DialogFragment(), View.OnClickListener {
fragmentFeedbackBinding = FragmentFeedbackBinding.inflate(inflater, container, false)
databaseService = DatabaseService(requireActivity())
mRealm = databaseService.realmInstance
model = UserProfileDbHandler(requireContext()).userModel!!
user = model.name
if (model != null) {
model = UserProfileDbHandler(requireContext()).userModel
}
user = model?.name
fragmentFeedbackBinding.btnSubmit.setOnClickListener(this)
fragmentFeedbackBinding.btnCancel.setOnClickListener(this)
return fragmentFeedbackBinding.root
Expand Down

0 comments on commit 27a8829

Please sign in to comment.