From f5167a2c949b62f6093c804c38df4be36cef04b5 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Mon, 4 Jul 2022 18:05:58 -0300 Subject: [PATCH] Revert "[FIX] Form re-rendering on RoomInfoEditView when app receives newer data from stream (#4220)" (#4340) This reverts commit d47320733a7e0f11daf253438b2470f29f7aa803. --- app/views/RoomInfoEditView/index.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/views/RoomInfoEditView/index.tsx b/app/views/RoomInfoEditView/index.tsx index 9af031896..bdfd8cf6c 100644 --- a/app/views/RoomInfoEditView/index.tsx +++ b/app/views/RoomInfoEditView/index.tsx @@ -6,6 +6,7 @@ import isEmpty from 'lodash/isEmpty'; import { Alert, Keyboard, ScrollView, Text, TextInput, TouchableOpacity, View, StyleSheet } 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'; @@ -85,6 +86,7 @@ interface IRoomInfoEditViewProps extends IBaseScreen { randomValue = random(15); + private querySubscription: Subscription | undefined; private room: TSubscriptionModel; private name: TextInput | null | undefined; private description: TextInput | null | undefined; @@ -121,6 +123,12 @@ class RoomInfoEditView extends React.Component { const { route, @@ -139,8 +147,12 @@ class RoomInfoEditView extends React.Component { + this.room = data; + this.init(this.room); + }); const result = await hasPermission( [