0
Fixed

Reload files

Mark11423 5 months ago in General updated 5 months ago 11

When I use git integration with working copy, and it updates a text file in the git repository, sometimes Textastic doesn't reload the file for ages, when they were already open in Textastic. Is there a better way to reload the updated files?

I need to close the file and reopen it to ensure that the updated file contents have been displayed in textastic.

Answer

Answer
Fixed

This should be fixed in Textastic 10.0.3 which was just released. It contains a workaround for this iOS bug. 

Thanks for reporting this issue!

Under review

Hello,

Textastic uses file coordination when opening a file and a file presenter while displaying a file. The system should notify the app if another app changes a file that is currently opened and Textastic should automatically reload the file.

For example, when you edit a file in Working Copy's editor and WC saves the file, Textastic should automatically reload it.


Do you know what exactly you are doing in Working Copy that does not trigger a reload? 


It's possible that Working Copy does not use a file coordinator for Git's pull operations for example, but I'd have to ask Anders Borum, the author of Working Copy to be sure. 

I think I could just reproduce the problem you are describing. It might be a bug. I'll investigate. Thanks for letting me know!

Yes, the operation in Working Copy I was doing that does not trigger a reload instantly is git pull. I am using Apple Shortcuts to pull the repository from my device's home screen.

I see the same problem in GoCoEdit, 1Writer and Runestone on iOS 17.1.1. All three apps (and Textastic) do not reload the file after it was changed in another app while already open. I'm sure this worked before, so it might be an iOS bug. I'll try to find out more. 

Textastic reloads changed files correctly on iOS 16.7.1, but not on iOS 17. This is a bug in iOS 17. 

I'll try to implement a workaround by looking at the file's modification date when Textastic comes to the foreground. 

I'll also report the issue to Apple. 

Thanks very much. As I am trying to use Working Copy and an iOS text editor for todo and shopping lists. I use Apple shortcuts with Working Copy to update the shopping lists by git pulling from the git repo.

I use Apple Shortcuts to open the files I want to open in Textastic from a json file (list of filenames). Without the text editor detecting the file change, I have to close all the tabs in the text editor and rerun the Apple Shortcut to open the files.

So having the text editor reload the files automatically once the git pull completes is quite important (out and about, etc.).

Interesting. Just a quick tip: to close a lot of tabs, you can tap and hold a tab to bring up the tab menu and choose "Close Other Tabs". Then you just need to close the current tab and all tabs are closed.

Maybe a shortcut action to close all tabs would be useful for cases like yours.

I talked to Anders Borum, the author of Working Copy, and we could reproduce the reload issue with Apple's Pages app. So this is definitely a system-wide issue introduced in iOS 17.

Yes, a shortcut action to close all tabs in Textastic would be great.

Answer
Fixed

This should be fixed in Textastic 10.0.3 which was just released. It contains a workaround for this iOS bug. 

Thanks for reporting this issue!

Just wondering if you might still be able to implement that shortcut action to close all tabs in Textastic.