From d47320733a7e0f11daf253438b2470f29f7aa803 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 9 Jun 2022 10:01:58 -0300 Subject: [PATCH] [FIX] Form re-rendering on RoomInfoEditView when app receives newer data from stream (#4220) --- app/views/RoomInfoEditView/index.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/views/RoomInfoEditView/index.tsx b/app/views/RoomInfoEditView/index.tsx index 6fd5f7cff..70693300e 100644 --- a/app/views/RoomInfoEditView/index.tsx +++ b/app/views/RoomInfoEditView/index.tsx @@ -6,7 +6,6 @@ import isEmpty from 'lodash/isEmpty'; import { Alert, Keyboard, ScrollView, Text, TextInput, TouchableOpacity, View } from 'react-native'; import ImagePicker, { Image } from 'react-native-image-crop-picker'; import { connect } from 'react-redux'; -import { Subscription } from 'rxjs'; import { deleteRoom } from '../../actions/room'; import { themes } from '../../lib/constants'; @@ -86,7 +85,6 @@ interface IRoomInfoEditViewProps extends IBaseScreen { randomValue = random(15); - private querySubscription: Subscription | undefined; private room: TSubscriptionModel; private name: TextInput | null | undefined; private description: TextInput | null | undefined; @@ -123,12 +121,6 @@ class RoomInfoEditView extends React.Component { const { route, @@ -147,12 +139,8 @@ class RoomInfoEditView extends React.Component { - this.room = data; - this.init(this.room); - }); + this.room = sub; + this.init(this.room); const result = await hasPermission( [