-
Notifications
You must be signed in to change notification settings - Fork 244
Restore narrow and scroll after theme switch. #414
base: master
Are you sure you want to change the base?
Conversation
ae9f23f
to
0d0835b
Compare
resolved conflicts |
@vishwesh3 thanks for working on this! 👍 |
@@ -133,6 +134,19 @@ public void setZulipActivity(ZulipActivity zulipActivity) { | |||
this.zulipActivity = zulipActivity; | |||
} | |||
|
|||
//store narrowFilter before switching theme | |||
private NarrowFilter narrowFilter = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default value will be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, its null private NarrowFilter narrowFilter = null;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we won't need to assign null additionally
private NarrowFilter narrowFilter;
@@ -147,6 +147,11 @@ public void setZulipActivity(ZulipActivity zulipActivity) { | |||
//on switch theme activity is recreated | |||
private boolean isThemeSwitchedFromHome = true; | |||
|
|||
//account for header | |||
//will be helpful when them is switched | |||
private int homeViewHeaderCount = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default value for integer member variables will be 0, hence we can omit this initialisation.
@vishwesh3 this looks great! 👍 |
Heads up @vishwesh3, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
Fix:#406
Summary of changes
Now narrow and scroll is restored after switching theme.
Screenshots
Switching theme in homeView
Switching theme in narrowedView
Switching theme in narrowedView and coming back to home
Please make sure these boxes are checked before submitting your pull request - thanks! Guide
Code is formatted.
Run the lint tests with
./gradlew lintDebug
and make sure BUILD is SUCCESSFULIf new feature is implemeted then it is compatible with Night theme too.
Commit messages are well-written.