Skip to content

Commit

Permalink
Renamed finish to unsubscribe.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Dec 4, 2024
1 parent ea58a6b commit 98d1485
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions content/chat/connect.textile
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ blang[javascript].
blang[react].

blang[swift].
To stop the subscription from firing new status events, call its @finish()@ function:
To stop the subscription from firing new status events, call its @unsubscribe()@ function:

```[swift]
subscription.finish()
subscription.unsubscribe()
```

h2(#discontinuity). Handle connection discontinuity
Expand All @@ -141,7 +141,7 @@ blang[react].
Any hooks that take an optional listener to monitor their events, such as typing indicator events in the @useTyping@ hook, can also register a listener to be notified of, and handle, periods of discontinuity.

blang[swift].
Each feature of the Chat SDK provides an @subscribeToDiscontinuities()@ method to assist with this. This enables you to create a subscription that will fire an event when discontinuity occurs in that feature so that you can handle it, as needed. As mentioned above, to stop your subscription from firing new events call its @finish()@ method.
Each feature of the Chat SDK provides an @subscribeToDiscontinuities()@ method to assist with this. This enables you to create a subscription that will fire an event when discontinuity occurs in that feature so that you can handle it, as needed. As mentioned above, to stop your subscription from firing new events call its @unsubscribe()@ method.

For example, for messages:

Expand Down
4 changes: 2 additions & 2 deletions content/chat/rooms/index.textile
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ blang[swift].
}
```

To cancel the room status subscribtion, call the provided @finish()@ method:
To cancel the room status subscribtion, call the provided @unsubscribe()@ method:

```[swift]
statusSubscription.finish()
statusSubscription.unsubscribe()
```
4 changes: 2 additions & 2 deletions content/chat/rooms/messages.textile
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ blang[react].
When you unmount the component that is using the @useMessages@ hook, it will automatically handle unsubscribing any associated listeners registered to receive messages.

blang[swift].
To cancel the room messages subscribtion, call the provided @finish()@ method:
To cancel the room messages subscribtion, call the provided @unsubscribe()@ method:

```[swift]
messagesSubscription.finish()
messagesSubscription.unsubscribe()
```

h2(#send). Send a message
Expand Down
4 changes: 2 additions & 2 deletions content/chat/rooms/occupancy.textile
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ blang[react].
When you unmount the component that is using the @useOccupancy@ hook, it will automatically handle unsubscribing any associated listeners registered for room occupancy.

blang[swift].
To cancel the room occupancy subscribtion, call the provided @finish()@ method:
To cancel the room occupancy subscribtion, call the provided @unsubscribe()@ method:

```[swift]
occupancySubscription.finish()
occupancySubscription.unsubscribe()
```

h2(#retrieve). Retrieve room occupancy
Expand Down
4 changes: 2 additions & 2 deletions content/chat/rooms/presence.textile
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ blang[react].
When you unmount the component that is using the @usePresenceListener@ hook, it will automatically handle unsubscribing any associated listeners registered for presence status updates.

blang[swift].
To cancel the room presence subscribtion, call the provided @finish()@ method:
To cancel the room presence subscribtion, call the provided @unsubscribe()@ method:

```[swift]
presenceSubscription.finish()
presenceSubscription.unsubscribe()
```

h2(#set). Set user presence
Expand Down
4 changes: 2 additions & 2 deletions content/chat/rooms/reactions.textile
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ blang[react].
When you unmount the component that is using the @useRoomReactions@ hook, it will automatically handle unsubscribing any associated listeners registered for room reactions.

blang[swift].
To cancel the room reactions subscribtion, call the provided @finish()@ method:
To cancel the room reactions subscribtion, call the provided @unsubscribe()@ method:

```[swift]
reactionSubscription.finish()
reactionSubscription.unsubscribe()
```

h2(#send). Send a room reaction
Expand Down
4 changes: 2 additions & 2 deletions content/chat/rooms/typing.textile
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ blang[react].
When you unmount the component that is using the @useTyping@ hook, it will automatically handle unsubscribing any associated listeners registered for typing events.

blang[swift].
To cancel the room typing subscribtion, call the provided @finish()@ method:
To cancel the room typing subscribtion, call the provided @unsubscribe()@ method:

```[swift]
typingSubscription.finish()
typingSubscription.unsubscribe()
```

h2(#set). Set typing status
Expand Down

0 comments on commit 98d1485

Please sign in to comment.