Draft
Conversation
This update introduces the ability to add, upload, and display video attachments in news posts. It extends the data model, repository, and UI to handle video files alongside images, including new UI elements for video selection and display, video upload logic, and video metadata management. String resources and layouts have been updated to support the new functionality.
Updated UploadManager to use RealmUser instead of RealmUserModel and corrected property access for user ID. In VoicesAdapter, replaced voicesRepository.getLibraryResource with getLibraryResourceFn for loading and adding library videos.
Replaced direct call to RealmMyTeam.isTeamLeader with teamsRepository.isTeamLeader using a coroutine. This change ensures team leader status is checked asynchronously and aligns with repository usage patterns.
❌ 8 blocking issues (8 total)
|
| val uri = data?.data | ||
| processVideoUri(uri, result.resultCode) | ||
| } | ||
| } |
| } | ||
| } | ||
| } | ||
| } |
|
|
||
| @JvmStatic | ||
| fun createNews(map: HashMap<String?, String>, mRealm: Realm, user: RealmUser?, imageUrls: RealmList<String>?, isReply: Boolean = false): RealmNews { | ||
| fun createNews(map: HashMap<String?, String>, mRealm: Realm, user: RealmUser?, imageUrls: RealmList<String>?, videoUrls: RealmList<String>? = null, isReply: Boolean = false): RealmNews { |
| `object`.addProperty("customDeviceName", NetworkUtils.getCustomDeviceName(MainApplication.context)) | ||
| `object`.add("privateFor", object1) | ||
| `object`.addProperty("mediaType", "video") | ||
| return `object` |
| } | ||
| } | ||
| } | ||
| } |
Replace separate image/video pickers with a single media picker: register openMediaLauncher in BaseVoicesFragment to handle single or multi-select URIs, route files to processImageUri/processVideoUri via a new processMediaUri helper, and show a toast for unsupported types. Update VoicesFragment and TeamsVoicesFragment to use the new add_news_media button and launch openMediaLauncher. Update layouts to rename buttons to add_news_media and replace labels with add_media. Add/adjust localized strings (add_media, video_already_added, please_select_video, please_select_image_or_video) across locales and normalize ellipses. This simplifies the UI and centralizes media-selection logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
video.webm