Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple click crash handled #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ayush-suman
Copy link
Contributor

Handled the crash due to multiple clicks on RecyclerView of EventFragment.
Added onError in subscribe to in EventAdapter.

@IshitaAg
Copy link
Owner

Have you checked for missing onError in all places?

@ayush-suman
Copy link
Contributor Author

I want to send another pull request with updates handling different error. Do I need to wait before this pull request gets accepted? Or can I send multiple pull requests at once?

@ayush-suman
Copy link
Contributor Author

Yes, in the Notification Crash Handled commit, I added onError in all places except in the quiz one. I might still have missed adding the code in some places as the source code has lot of files. Do tell me if you find any.

@PrarabdhGarg
Copy link
Collaborator

I want to send another pull request with updates handling different errors. Do I need to wait before this pull request gets accepted? Or can I send multiple pull requests at once?

You can send multiple pull requests. That is not an issue. Just make sure to create a new branch for every pull request.

@PrarabdhGarg
Copy link
Collaborator

@ayush-suman also please make sure that you request at least one of our name in the Reviewers section, and also assign every pull request to the proper person.

@IshitaAg
Copy link
Owner

Stash all the commits into one

@ayush-suman
Copy link
Contributor Author

Updated the pull request commits with requested change implemented.
Indentation of the code is corrected. @PrarabdhGarg

@PrarabdhGarg
Copy link
Collaborator

@ayush-suman also your commit message should be Correct code indentation instead of Corrected code Indentation

Comment on lines +187 to +192
} catch (e: ActivityNotFoundException) {
Toast.makeText(
applicationContext,
"Error. Not supported in your phone",
Toast.LENGTH_SHORT
).show()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the correct indentaion for a Toast message, but because of the theme already followed throughout the app, make it in a single line. Try to keep your indentation uniform with the rest of the app

Log.e("Main Activity", "Failed to recive token")
setupNotificationChannel()
}
} catch (e: Exception) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it } catch (e: Exception) { }

Comment on lines +392 to +395
if (appUpdateInfo.availableVersionCode().toString() == versionNumber && appUpdateInfo.isUpdateTypeAllowed(
AppUpdateType.IMMEDIATE
)
) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, try following the indentation followed throughout the codebase

Comment on lines +416 to +421
val snackbar = Snackbar.make(
this.coordinator_parent,
"A newer version of the app is available",
Snackbar.LENGTH_INDEFINITE
)
snackbar.setAction("UPDATE", object : View.OnClickListener {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Comment on lines +431 to +432
data =
Uri.parse("https://play.google.com/store/apps/details?id=v2015.oasis.pilani.bits.com.home")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this in a single line

Comment on lines +464 to +469
val snackbar = Snackbar.make(
coordinator_parent,
"A new update has been downloaded and is ready to install",
Snackbar.LENGTH_INDEFINITE
)
snackbar.setBehavior(object : BaseTransientBottomBar.Behavior() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solve this throughout your PR

if (orderItems[position].status == 2){
listener.updateOtpSeen(orderItems[position].orderId)
Log.d("OTP", "Called")
}
else{
Log.d("OTP", "Status not yet ready ${orderItems[position].status}")
}
}
},{})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space after the comma, and one between the empty braces

listener.addButtonClicked(stallItems[position], stallItems[position].quantity + 1)
}
},{})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@PrarabdhGarg
Copy link
Collaborator

@ayush-suman you also didn't change the Assignees section appropriately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants