File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
apps/files_sharing/lib/Listener Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function __construct(
6161
6262 public function handle (Event $ event ): void {
6363 // don't trigger the on-setup checks if this handler triggers an fs setup
64- $ this ->homeSetupListener ->setDisabled (true );
64+ $ oldState = $ this ->homeSetupListener ->setDisabled (true );
6565
6666 if ($ event instanceof UserShareAccessUpdatedEvent) {
6767 foreach ($ event ->getUsers () as $ user ) {
@@ -111,7 +111,7 @@ public function handle(Event $event): void {
111111 }
112112 }
113113
114- $ this ->homeSetupListener ->setDisabled (false );
114+ $ this ->homeSetupListener ->setDisabled ($ oldState );
115115 }
116116
117117 private function markOrRun (IUser $ user , callable $ callback ): void {
Original file line number Diff line number Diff line change @@ -30,8 +30,10 @@ public function __construct(
3030 ) {
3131 }
3232
33- public function setDisabled (bool $ disabled ): void {
33+ public function setDisabled (bool $ disabled ): bool {
34+ $ previous = $ this ->disabled ;
3435 $ this ->disabled = $ disabled ;
36+ return $ previous ;
3537 }
3638 public function handle (Event $ event ): void {
3739 if (!$ event instanceof UserHomeSetupEvent) {
You can’t perform that action at this time.
0 commit comments