Skip to content

Conversation

@tobiasKaminsky
Copy link
Member

@tobiasKaminsky tobiasKaminsky commented Apr 19, 2018

Adding proposed fix by @AndyScherzinger (#1704 (comment))

Fixes #1908
Fixes #1704
Fixes #2015
Fixes #1698
Fixes #2100
Fixes #2198

onViewStateRestored() is executed directly after onActivityCreated() when starting the app / switching to e.g. favorite search from "all files".
But after previewing a file from favorite search, only onViewStateRestored() is called, therefore we need to keep it there and thus remove it in onActivityCreated().

Signed-off-by: tobiasKaminsky tobias@kaminsky.me

@AndyScherzinger
Copy link
Member

Will this then still work for display rotation and search since I'd guess that it is why it has been added back then?

Cc @mario

@tobiasKaminsky
Copy link
Member Author

Yes, I tried this

  • open app
  • switch to favorites -> 2 files
  • rotate
  • open one text file
  • back
  • rotate

always I had the two favorite results.

As explained above, adding it to onViewStateRestored() was the right fix for rotation and such, but then we missed removing it from the other function.

@AndyScherzinger
Copy link
Member

So without having the time to test the branch by search I meant if I do a search within "all files" it'll still work?

@tobiasKaminsky
Copy link
Member Author

Hm. Search is indeed behaving a bit weird.
I have this in my test cloud:

./test2.txt
./435/2.txt
./0/Test2.txt

but app returns on search for "2.txt":

  • 2.txt
  • 2.txt
  • test2.txt
  • test2.txt
  • Test2.txt

--> I will have look into it again.
Thanks for the hint!

@tobiasKaminsky
Copy link
Member Author

Hm. After a clean installation I cannot reproduce the problem.
I debugged it and server is giving only the correct results back, no duplicates.

So, from my side this is ready for review.

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Apr 23, 2018

👍

Approved with PullApprove

@AndyScherzinger
Copy link
Member

@mario for second review :)

@AndyScherzinger
Copy link
Member

@mario @ardevd for second review :)

@AndyScherzinger
Copy link
Member

cc @mario @ardevd for second review/approval.

@AndyScherzinger AndyScherzinger force-pushed the fixDoubleSearch branch 3 times, most recently from f65145c to 4202308 Compare May 21, 2018 20:30
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@mario
Copy link
Contributor

mario commented May 23, 2018

👍

Approved with PullApprove

@mario mario merged commit 51dca02 into master May 23, 2018
@mario mario deleted the fixDoubleSearch branch May 23, 2018 06:50
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.2.0 milestone May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants