# Fix "IncomingCallNotification was dropped" error when accepting a call · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/376aa1235f55b6fa185ccea906a98fbc212204aa)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 376aa1235f55b6fa185ccea906a98fbc212204aa

Requested commit: 376aa1235f55b6fa185ccea906a98fbc212204aa

Commit: 376aa1235f55b6fa185ccea906a98fbc212204aa

Tree: ae1121eec8d7f55aec950c516649bc18be8593f4

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Fix "IncomingCallNotification was dropped" error when accepting a call

This was caused by accepting the call, which caused the notification to
be removed. When `active_call.accept_incoming()` finally completed, we
would try to get the app state from it in order to join the project, but
couldn't becuase the view would have already been dropped.

This commit fixes the bug by capturing a weak handle to the app state
when accepting the call as opposed to trying to read it from the view
when the accept completes.

```

## Parents

- [c3cf9e31859efb02e567a9b8dbb7d105f68ccd55](https://git.cafe/gitcafe/zed/commit/c3cf9e31859efb02e567a9b8dbb7d105f68ccd55?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/376aa1235f55b6fa185ccea906a98fbc212204aa?format=markdown)
