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

Fixes: PSLabSensor Activity decoupled from fragments #2110

Merged
merged 2 commits into from
May 16, 2020

Conversation

karvik09
Copy link
Contributor

@karvik09 karvik09 commented May 14, 2020

Fixes #2108

Changes: PSLabSensorActivity will interact with OperationCallback for operation not any specific fragments by doing this we can eliminate coupling & reduce boilerplate code.

@cweitat cweitat requested a review from CloudyPadmal May 16, 2020 09:25
Copy link
Collaborator

@CloudyPadmal CloudyPadmal left a comment

Choose a reason for hiding this comment

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

@VIKAS9899 thank you for the pull request. Seems good. Can you build the APK file and upload here so that we can test it? Also I have requested some code refactoring changes. Thanks again.

Comment on lines 342 to 346
fragment=getSupportFragmentManager()
.findFragmentByTag(getSensorName());

if (fragment instanceof OperationCallback){
((OperationCallback) fragment).playData();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reformat the code here. You can use automatic option in Android studio. It will add missing spaces and indents.

fragment=getSupportFragmentManager()
.findFragmentByTag(getSensorName());

if (fragment instanceof OperationCallback){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar reformatting here

Comment on lines 383 to 387
fragment=getSupportFragmentManager()
.findFragmentByTag(getSensorName());

if (fragment instanceof OperationCallback){
((OperationCallback) fragment).saveGraph();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here as well

@CloudyPadmal CloudyPadmal added the Fix Solution to an existing issue in app label May 16, 2020
@karvik09
Copy link
Contributor Author

@VIKAS9899 thank you for the pull request. Seems good. Can you build the APK file and upload here so that we can test it? Also I have requested some code refactoring changes. Thanks again.

@CloudyPadmal I have refracted the code. Please find the APK below

https://drive.google.com/file/d/1H9k2Cs57xeW-3suS-MlLtiSWBeZkuOlJ/view?usp=sharing

@karvik09 karvik09 requested a review from CloudyPadmal May 16, 2020 14:18
@CloudyPadmal CloudyPadmal requested a review from cweitat May 16, 2020 20:17
@cweitat cweitat merged commit 79c0202 into fossasia:development May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Solution to an existing issue in app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Interface Callbacks to reduce Coupling between Activity and Fragments and reduce the lines of code
3 participants