ecency-mobile icon indicating copy to clipboard operation
ecency-mobile copied to clipboard

fix crash while creating post

Open noumantahir opened this issue 2 years ago • 5 comments

noumantahir avatar May 27 '22 14:05 noumantahir

duplicate of #2316

aliseyalvi avatar May 29 '22 17:05 aliseyalvi

It's not duplicate actually, the first one related to assessing the issue only, not fixing it.

noumantahir avatar May 30 '22 12:05 noumantahir

@feruzm

My assessment on text input show that the real issue is with out Editor screen and not with TextInput... I stripped editor screen of everything there was other than texinput and a button to use setNativeProps.

Editor worked fine for first 3000 words even with setNativeProps used... after adding anther 3000 words a total of 6000 words, textinput was not as responsive but was usable, although even 3000 is like a loooot words for a mobile writer imo..

Bottom line is, instead of writing our own text input, may we should see how we can optimise the editor screen itself as otherwise I doubt we will gain any improvement to Editor screen with any kind change in TextInput be is web variant or native.

https://user-images.githubusercontent.com/6298342/172148558-8f61334d-73f9-47ca-a9f9-ad81c942fb60.mov

noumantahir avatar Jun 06 '22 11:06 noumantahir

@noumantahir Great find, would be good time to check all props of editor screen and optimize it then or rewrite new editor screen and replace old one, move important methods and keep structure clean 👍

feruzm avatar Jun 06 '22 11:06 feruzm

Some quick fixes to implement

  • [x] reduce frequency of validity check
  • [x] reduce frequency of local draft save
  • [x] optimise username check
  • [ ] update modals to unmount content after closure
    1. ~~Uploads modal~~
    2. snippets modal
    3. community modal
    4. Thumb selection modal
    5. Basic Header modals
  • [ ] bypass state setting routines on text change

noumantahir avatar Jun 06 '22 13:06 noumantahir