We frequently send outgoing messages with some parameters, like "link
preview" or "quoted reply", empty.
This change lets those parameters be omitted (instead of explicitly
empty) for brevity.
This is a stylistic change and should have no user impact.
Tested this by sending a regular message, a message with a link preview,
and two messages with photos.
You can add callbacks to be executed when a transaction completes. We
usually do this when sending messages, but not always.
Previously, the logic was "add a callback that runs the completion
function, if it exists." Now, the logic is "if the completion function
exists, add a callback that runs it."
I think this slightly better reflects our intent, and helps reduce
memory usage (and potential capturing?) slightly.
* Little fix for context menu
* Add 'My Stories' section to stories tab
* Add new story thread types
* Show stories in conversation picker
* Support for sending stories
* Update story list when sending stories
* Add basic 'My Stories' view controller
* Initial stories settings screens
* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class
* Require an explicit read transaction to initialize an outgoing message
* Fix linting
* Allow enabling group story from internal settings
* Fix tests
* PR Feedback
By moving the check after the `isLoggingEnabled()` check, there isn’t
unreachable code, so the compiler warning goes away. (The `_isDebug…`
check has to be second, or the `isLoggingEnabled()` call would be
unreachable code.)
For the other case, I wrapped the entire check in a single `assert`,
avoiding the `_isDebugAssertConfiguration` call altogether. (This one
wasn’t a warning, but I think this approach is more canonical, and it’s
probably best to avoid `_` functions where possible.)