rename
This commit is contained in:
6
App.tsx
6
App.tsx
@@ -68,7 +68,7 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
await this.setupPermissions();
|
await this.setupPermissions();
|
||||||
|
|
||||||
this.echoSub = onProxyMessage((msg) => {
|
this.onProxyMessageSub = onProxyMessage((msg) => {
|
||||||
if (msg.type === 'echo') {
|
if (msg.type === 'echo') {
|
||||||
Alert.alert('Echo 回来了', JSON.stringify(msg.data));
|
Alert.alert('Echo 回来了', JSON.stringify(msg.data));
|
||||||
}
|
}
|
||||||
@@ -90,12 +90,12 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
this.appStateSubscription = AppState.addEventListener('change', this.handleAppStateChange);
|
this.appStateSubscription = AppState.addEventListener('change', this.handleAppStateChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
private echoSub?: ReturnType<typeof onProxyMessage>;
|
private onProxyMessageSub?: ReturnType<typeof onProxyMessage>;
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this.stopProxyClient();
|
this.stopProxyClient();
|
||||||
stopSmsListener();
|
stopSmsListener();
|
||||||
this.echoSub?.remove();
|
this.onProxyMessageSub?.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
sendEcho = () => {
|
sendEcho = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user