Commit Graph

46 Commits

Author SHA1 Message Date
melod1n 4677e484d9 move strings in core/ui module
disable generating android resources everywhere except core/ui module
replace UiR with R
2025-08-27 04:53:46 +03:00
melod1n 799ed820e3 feat: audio message preview 2025-08-26 09:36:55 +03:00
melod1n 47c1f623f0 Refactor: Introduce video message record mode
This commit refactors the `ActionMode` sealed class into an enum and adds a new `RECORD_VIDEO` state. This allows for distinct actions for recording audio and video messages.

Specifically, the following changes were made:
- Converted `ActionMode` from a sealed class to an enum.
- Added `RECORD_VIDEO` to `ActionMode`.
- Updated `MessagesHistoryInputBar` to:
    - Animate the action button icon change between record modes.
    - Remove the shake animation from emoji, attachment, and mic buttons.
- Updated `MessagesHistoryViewModel` to toggle between `RECORD_AUDIO` and `RECORD_VIDEO` when the action button is clicked in a record mode.
- Added support for displaying `VIDEO_MESSAGE` attachments in `Attachments.kt`, including an animated circular preview.
- Updated `MessageBubble` to render video messages without a background, similar to stickers.
- Added `image` property to `VkVideoMessageDomain` to hold the URL for the video message preview.
- Added a new drawable `rounded_photo_camera_24` for the video record button.
- Updated `VkVideoMessageData` to parse and provide the square preview image URL to the domain model.
2025-08-20 00:31:33 +03:00
melod1n 600aed40e7 Refactor: Make FullScreenDialog dismissible
This commit introduces a dismiss functionality to the `FullScreenDialog`.

The `FullScreenDialog` now accepts an `onDismiss` lambda parameter.
This `onDismiss` lambda is invoked when a dismiss request is made for the dialog.

In `PhotoViewScreen`, the `onDismiss` lambda passed to `FullScreenDialog` is now the `onDismiss` lambda received by the `PhotoViewScreen` itself.
2025-08-19 23:15:37 +03:00
melod1n 252f6ec21e Refactor: Use Dialog for PhotoViewScreen
This commit refactors the PhotoViewScreen to be displayed as a Dialog instead of a separate navigation destination.

Key changes:
- Introduced `PhotoViewDialog` composable that wraps `PhotoViewRoute` in a `FullScreenDialog`.
- Modified `RootScreen` to use `PhotoViewDialog` for displaying images.
- Updated `PhotoViewViewModelImpl` to handle loading state and display a loader while downloading images.
- Made `Loader` and `ContainedLoader` colors configurable.
- Adjusted `PhotoViewScreen` UI:
    - Set background to translucent black.
    - Updated TopAppBar background color and icon tints.
    - Improved vertical drag gesture for dismissing the viewer.
- Made `VkUserData.LastSeen.platform` nullable.
- Removed unused navigation functions related to the old PhotoViewScreen.
2025-08-19 22:54:38 +03:00
melod1n 70b552412c Enhance PhotoViewer with share and open-in actions, improve reply UI
This commit introduces "Share" and "Open in..." actions to the `PhotoViewScreen`, allowing users to share images via other apps or open them in external viewers.

**Key changes:**

- **PhotoViewer:**
    - Added "Share" and "Open in..." options to the `PhotoViewScreen` dropdown menu.
    - `PhotoViewViewModel`:
        - Implemented `onShareClicked()` and `onOpenInClicked()` to handle these new actions.
        - Added `shareRequest` StateFlow to manage image sharing intents.
        - Introduced `downloadAndStoreImageToCache()` to download and cache images for sharing.
        - `onImageShared()` resets `shareRequest` after sharing.
    - Updated `TopBar` to include the new menu items.
    - Added string resources for "Open in…" and "Share".
- **Reply UI:**
    - `Reply.kt`: Title and summary text now use `TextOverflow.Ellipsis` to prevent long text from breaking the layout.
- **API Model:**
    - `MessagesResponse.kt`: Added `MessagesMarkAsImportantResponse` data class to handle the response for marking messages as important.
- **Data Layer:**
    - `MessagesRepositoryImpl`: Updated `markAsImportant` to correctly map the API response using `MessagesMarkAsImportantResponse`.
- **Minor:**
    - `README.md`: Updated feature checklist for external viewer.
    - `ApplicationModule.kt`: Added experimental Coil API opt-in.
2025-06-26 20:46:53 +03:00
melod1n 3dae1fe101 Refactor: Introduce FullScreenContainedLoader and use rememberUpdatedState
This commit introduces `FullScreenContainedLoader` and replaces usages of `FullScreenLoader` where appropriate.

It also updates several composables to use `rememberUpdatedState` for lambda parameters to ensure the latest versions are used.

Additionally, the following changes are included:
- Add a setting to show/hide the attachment button in the chat input bar.
- Implement navigation to `PhotoViewScreen` when a photo attachment is clicked in a message.
- Add "Copy link" and "Copy image" actions to `PhotoViewScreen`.
- Remove unused settings and their corresponding logic from `SettingsViewModel` and `UserSettings`.
2025-06-24 14:44:51 +03:00
melod1n 9d4e3f50ea split MessagesHistoryScreen.kt in separated composables.
Added "regular" to text field in messages history screen - for clearing formatting
2025-06-23 17:36:02 +03:00
melod1n 17b5c944ac m3 expressive theme and full screen loader
revert pre-loading non-main screens
2025-06-20 21:55:17 +03:00
melod1n 5aa1f21183 switch to compose-bom-alpha 2025-06-20 21:25:17 +03:00
melod1n 325211ad5f refactor: improve auth screen and bump haze version
* Bump haze version to 1.6.0.
* Blur now works on android 11 and older
* Add "Sign up" and "Forgot password?" links to the auth screen.
* Add logic to toggle dynamic colors on logo click in the auth screen (Android 12+).
2025-05-13 22:52:53 +03:00
melod1n 43539139e8 Simple attachments in messages history (#164)
* new attachments in messages history - photo, video, audio, file, link
* improve attachments in messages history and adjusted font size for logo's text in auth screen
* audio duration, file preview and url preview are now visible in attachments in messages history screen
* make MessageBubble width adapt to attachments container width
* topbar back icon crossfade animation
* implement rich text for message input
* handle click and long click on attachments
* added click and long click handlers for attachments in message bubbles
* enabled opening photos, files, and links when clicked.
* implemented basic long-click logging for photos.
* handled back press to return to Conversations from other tabs.
* corrected the logic for filtering and selecting video images.
* updated string resources for attachments, including a new "Clip" string.
* make MessageBubble mention text underline on out messages
2025-05-10 03:10:07 +03:00
melod1n 89748b72ed Update API version (#147)
* Bump VK Api version to 5.238
* Implemented new authorization flow (at the moment, without auto re-requesting token)
* Add support for sticker pack preview attachments
* Bump LongPoll to version 19
* Improved messages handling
* Fixed coloring issues
* Cache improvements
* Archive screen with full functionality
* Recomposition fixes
* Markdown support for messages bubbles
* Adjust app name font size based on screen width
* Navigation related improvements
* Add logout functionality
2025-04-04 20:43:59 +03:00
melod1n 5b5e8f8446 Implement scroll to top in friends and conversations screens 2025-03-29 22:31:48 +03:00
melod1n d46c72f7e6 improve login screen UI and logic & fixes for blur 2025-03-29 22:03:37 +03:00
melod1n f02822a011 a shit ton features, improvements and fixes in messages history screen and others 2025-03-29 02:51:49 +03:00
melod1n da9644cde1 Add theme option to disable animations and fix account avatar loading in bottom bar 2025-03-28 19:59:38 +03:00
melod1n 9aa85d40c6 pinned message in messages history draft 2025-03-27 12:16:26 +03:00
melod1n 807c23926e reworked chat materials screen and some fixes 2025-03-27 02:27:19 +03:00
melod1n 4d18c86f04 feat(messages): add message selection and actions 2025-03-26 22:06:55 +03:00
melod1n 0ae05709db feat: Add ordering functionality for friends list 2025-03-26 01:28:50 +03:00
melod1n b2879d8756 Release 0.1.8 (#139)
* pagination in chat fixed
* other fixes and improvements

* fixed visual bug in progress bar in chat history

* Refactor: Enhance conversations and friends features

-   In `ConversationsScreen`, removed `isNeedToScrollToTop` and `onScrolledToTop`, and refactored toolbar container color logic. Added `NoItemsView` for empty conversation lists.
-   In `MainGraph`, added `onMessageClicked` for navigation to message history.
-   In `ApiEvent`, introduced `parseOrNull` for handling unknown event types.
-   In `ConversationsViewModel`, removed `scrollToTop` logic and refactored error handling.
-   In `FriendsViewModel`, refactored error handling and introduced `onErrorConsumed` and `handleError`.
-   In `FriendItem`, added an icon button to initiate sending a message to a friend.
-   In `strings.xml`, added or updated strings for session expiration, log out, refreshing, and empty friend lists.
-   In `RootScreen`, added `onMessageClicked` for navigating to messages.
-   In `FriendsList`, added `onMessageClicked` for handling message clicks.
-   In `MainScreen`, removed unused `MutableSharedFlow`.
-   In `FriendsScreen`, added support for showing errors, added `onMessageClicked`, and replaced `hazeChild` with `hazeEffect` and `hazeSource`.
-   In `FriendsNavigation`, added `onMessageClicked` for handling message clicks.
-   In `ConversationsNavigation`, removed the unused `scrollToTopFlow` parameter.
-   In `ErrorView`, added text alignment.
-   In `NoItemsView`, added support for a button and custom text.
-   In `LongPollUpdatesParser`, replaced try-catch with `parseOrNull`.

* Chat creation feature (#138)

* - read indicator, edit status and time for message in messages history

* message sending status
2025-03-23 09:22:41 +03:00
melod1n 30e132d418 Release 0.1.7 (#136)
* Bump haze from 1.1.1 to 1.2.0 (#105)

* Bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.7.3 to 1.8.0 (#104)

* update gradle wrapper

* Bump agp from 8.7.3 to 8.8.0 (#106)

* Bump com.jraska.module.graph.assertion from 2.7.1 to 2.7.3 (#109)

* Bump haze from 1.2.0 to 1.2.2 (#111)

* Bump koin from 4.0.1 to 4.0.2 (#112)

* little improvement

* Bump kotlin from 2.1.0 to 2.1.10 (#113)

* Bump androidx.compose:compose-bom from 2024.12.01 to 2025.02.00 (#115)

* Bump androidx.navigation:navigation-compose from 2.8.5 to 2.8.7 (#119)

* Bump haze from 1.2.2 to 1.3.1 (#118)

* Bump ksp from 2.1.0-1.0.29 to 2.1.10-1.0.30 (#116)

* Bump agp from 8.8.0 to 8.8.1 (#117)

* Bump com.google.accompanist:accompanist-permissions (#121)

* Rename the app's namespace and applicationId to `dev.meloda.fastvk`, and update the package name in `ACTION_MANAGE_UNKNOWN_APP_SOURCES` intent. Remove unnecessary `onLowMemory` method in the `OnlineService`.

* Bump com.jraska.module.graph.assertion from 2.7.3 to 2.8.0 (#126)

* Bump ksp from 2.1.10-1.0.30 to 2.1.10-1.0.31 (#125)

* Bump haze from 1.3.1 to 1.4.0 (#124)

* Bump agp from 8.8.1 to 8.8.2 (#123)

* Bump androidx.navigation:navigation-compose from 2.8.7 to 2.8.8 (#122)

* Bump haze from 1.4.0 to 1.5.0 (#128)

* Bump agp from 8.8.2 to 8.9.0 (#127)

* Bump androidx.navigation:navigation-compose from 2.8.8 to 2.8.9 (#130)

* Bump androidx.compose:compose-bom from 2025.02.00 to 2025.03.00 (#129)

* revert agp version to 8.8.2

* fix issues with package names

* Bump haze from 1.5.0 to 1.5.1 (#133)

* Bump com.google.guava:guava from 33.4.0-jre to 33.4.5-jre (#132)

* russian translations

* fixes and improvements

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-21 03:13:17 +03:00
melod1n 7c14df1824 release 0.1.5 (#98)
* settings reorganization;
implement long press on emoji button for fast text;
some deprecations fixed;
some typos fixed;
etc

* ability to use more animations (experimental);
fix online friends loading;
conversation avatar in messages history screen;
test second tap on conversations item in bottom bar to scroll to top;
etc

* version up
2024-12-17 21:07:22 +03:00
melod1n 46e580dc2e fix conversations attachment icon's tint + fix radiobuttons and checkboxes' not clickable in settings 2024-12-14 01:14:25 +03:00
melod1n 97d543539d (fix) ability to use system font 2024-11-01 21:54:50 +03:00
melod1n 957ade0867 some updates 2024-10-28 19:57:53 +03:00
melod1n babf20f62e return of debug token for auth; ability to disable haptic and set logging level; etc 2024-10-26 02:40:31 +03:00
melod1n 0500969d81 domain module 2024-08-11 17:40:13 +03:00
melod1n 19fa2c79a8 fix potential recompositions 2024-08-04 04:53:00 +03:00
melod1n c829a7f96a update libs and fix localization 2024-08-04 04:05:14 +03:00
melod1n ce306c995e improvements in ui 2024-07-19 06:52:25 +03:00
melod1n 2b018add7c fast login with token 2024-07-19 06:01:16 +03:00
melod1n 1817698031 simple photo viewer 2024-07-16 10:29:37 +03:00
melod1n a696425dc8 more fixes 2024-07-16 07:43:08 +03:00
melod1n c8b1d72f08 update package name (even bigger one) 2024-07-16 07:02:50 +03:00
melod1n 4f9e49003b update package name (big one) 2024-07-16 06:37:37 +03:00
melod1n fa5f707e52 fix dividers visibility & add animated visibility 2024-07-16 03:09:13 +03:00
melod1n c77588c559 remove old material dialog 2024-07-16 02:55:11 +03:00
melod1n eb34c0c1cb improve ui in messages history screen 2024-07-16 02:50:58 +03:00
melod1n b252c03be7 clean up settings and some other things 2024-07-16 02:12:19 +03:00
melod1n 46d3fe63fa ability to enable/disable pull to refresh 2024-07-16 00:15:15 +03:00
melod1n 789283fcff settings refactoring 2024-07-15 22:34:00 +03:00
melod1n 304c630d1d improvements for previewing validation & captcha screens 2024-07-15 19:02:49 +03:00
melod1n ee7499f117 move all ui-related classes and files to ui module 2024-07-15 18:31:58 +03:00
melod1n 3503ecffab Upstream changes (#23) 2024-07-10 16:12:32 -07:00