Skip to content

Commit

Permalink
use const val HTTP_STATUS_CODE_OK
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <[email protected]>
  • Loading branch information
sowjanyakch committed Nov 8, 2024
1 parent e2ae181 commit f18c957
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class SetStatusDialogFragment :

@SuppressLint("NotifyDataSetChanged")
override fun onNext(statusOverall: StatusOverall) {
if (statusOverall.ocs?.meta?.statusCode == 200) {
if (statusOverall.ocs?.meta?.statusCode == HTTP_STATUS_CODE_OK) {
backupStatus = statusOverall.ocs?.data!!
isBackupStatusAvailable = true
val backupPredefinedStatus = PredefinedStatus(
Expand Down Expand Up @@ -299,7 +299,7 @@ class SetStatusDialogFragment :
@SuppressLint("NotifyDataSetChanged")
override fun onNext(genericOverall: GenericOverall) {
Log.d(TAG, "$genericOverall")
if (genericOverall.ocs?.meta?.statusCode == 200) {
if (genericOverall.ocs?.meta?.statusCode == HTTP_STATUS_CODE_OK) {
binding.automaticStatus.visibility = View.GONE
adapter.isBackupStatusAvailable = false
predefinedStatusesList.removeAt(0)
Expand Down Expand Up @@ -624,6 +624,7 @@ class SetStatusDialogFragment :
*/
companion object {
private val TAG = SetStatusDialogFragment::class.simpleName
private const val HTTP_STATUS_CODE_OK = 200

@JvmStatic
fun newInstance(status: Status): SetStatusDialogFragment {
Expand Down

0 comments on commit f18c957

Please sign in to comment.