Issue fixed related to Toast

This commit is contained in:
Mariya
2024-01-05 18:24:36 +05:30
parent f9b8df970d
commit 7ba0124f1a
4 changed files with 10 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ android {
// prod - production, preprod - preproduction, quality - qc
defaultConfig {
applicationId "in.sminnovations.hpostesting.quality"
applicationId "in.sminnovations.hpostesting"
minSdk 21
targetSdk 34
versionCode 26

View File

@@ -129,7 +129,7 @@
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.example.hpostesting.quality.fileprovider"
android:authorities="com.example.hpostesting.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data

View File

@@ -64,7 +64,7 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
if (batLevel < 40) {
Toast.makeText(
view.context,
context?.getString(R.string.low_battery_warning),
view.context.getString(R.string.low_battery_warning),
Toast.LENGTH_SHORT
).show()
return@setOnClickListener
@@ -73,7 +73,7 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
if (userList.testStatus!!) {
Toast.makeText(
view.context,
context?.getString(R.string.test_already_conducted),
view.context.getString(R.string.test_already_conducted),
Toast.LENGTH_SHORT
).show()
} else {
@@ -81,13 +81,14 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
if (isBetween15And30Minutes(userList.incubationTime) < Constants.INCUBATION_TIME_MIN) {
Toast.makeText(
view.context,
context?.getString(R.string.incubation_not_completed),
view.context.getString(R.string.incubation_not_completed),
Toast.LENGTH_SHORT
).show()
} else if (isBetween15And30Minutes(userList.incubationTime) > Constants.INCUBATION_TIME_MAX) {
} else
if (isBetween15And30Minutes(userList.incubationTime) > Constants.INCUBATION_TIME_MAX) {
Toast.makeText(
view.context,
context?.getString(R.string.incubation_crossed_30_minutes),
view.context.getString(R.string.incubation_crossed_30_minutes),
Toast.LENGTH_SHORT
).show()
} else {
@@ -102,7 +103,7 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
} else {
Toast.makeText(
view.context,
context?.getString(R.string.incubation_not_started),
view.context.getString(R.string.incubation_not_started),
Toast.LENGTH_SHORT
).show()
}

View File

@@ -169,7 +169,7 @@ class DashboardActivity : AppCompatActivity() {
val uri: Uri = FileProvider.getUriForFile(
this,
"com.example.hpostesting.quality.fileprovider",
"com.example.hpostesting.fileprovider",
file
)