Present toast after publishing an edit, IF a new temporary account was spun up:
- (In EditSaveViewController.swift) Before publishing the edit, grab the user's auth state from auth manager (see https://github.com/wikimedia/wikipedia-ios/pull/5176 for how to pull an accurate auth state, as our approach changed a lot in PR review for that.) Make a note of this value (note, calling this method upon landing on the publish screen will likely already be done as a part of T374013).
- (In EditSaveViewController.swift) After edit publish is successful (in handleEditSuccess), check auth state again. If this second check indicates an authState of temporary, and the first check indicated ip, then we know a new temporary account was spun up during editing. Pass this flag along to the delegate when calling self.delegate?.editSaveViewControllerDidSave(self, result: result) in handleEditSuccess.
- In EditorViewController's EditSaveViewControllerDelegate conformance (editSaveViewControllerDidSave), continue passing the new flag along to the delegate?.editorDidFinishEditing(self, result: result) call.
- In ArticleViewController's EditorViewControllerDelegate conformance (editorDidFinishEditing), check the new flag. If flag indicates that a new temporary account was spun up, present a toast using WMFAlertManager.
Test notes
Fresh install
Navigate to an article (I changed language to test first)
Edit article, save, etc.
After your edit published toast comes up, ensure one comes up about temp account
Experimental Build 238