401 Commits

Author SHA1 Message Date
melod1n 96ee5ea45e feat: add network connectivity observer 2026-05-30 23:17:37 +03:00
melod1n dc5b4b3fb0 refactor(settings): emit navigation and haptic actions as one-off screen effects 2026-05-30 21:17:37 +03:00
melod1n a1278f7558 feat: implement error state handling in ConvosScreen 2026-05-30 20:37:31 +03:00
melod1n 6b91d388a2 fix "..." in user's names when "Use contact names" is true 2026-05-30 20:35:37 +03:00
melod1n 8c053905ce feat: extend friends data support and refactor profile state management 2026-05-30 20:30:55 +03:00
melod1n 2381d4ca0a refactor(longpoll): move event listeners into LongPollEventsHandler 2026-05-30 19:54:45 +03:00
melod1n 2daab8d0f7 refactor(settings): route settings UI through intents and navigation effects 2026-05-30 19:16:38 +03:00
melod1n 10453287a7 refactor(logging): introduce custom FastLogger and replace direct Android logging 2026-05-30 18:32:25 +03:00
melod1n fc3b3cfcb3 refactor(longpoll): route parsed long poll events through dedicated handler and persist message/conversation state updates 2026-05-30 17:17:32 +03:00
melod1n f11b8dc6f4 refactor: consolidate convos state and intent handling 2026-05-30 15:39:43 +03:00
melod1n 167f980f29 refactor StateFlow exposure in ConvosViewModel 2026-05-30 12:01:06 +03:00
melod1n d428af4ac4 refactor: simplify Profile feature state management and update ViewModel 2026-05-30 11:46:14 +03:00
melod1n 63bae014c5 feat: replace settings icon button with segmented buttons in ProfileScreen 2026-05-30 11:43:48 +03:00
melod1n ad54477d11 feat: add segmented buttons to friends screen 2026-05-30 11:39:10 +03:00
melod1n c8bd485724 feat: add custom segmented buttons and refactor conversation screen actions 2026-05-30 11:33:32 +03:00
melod1n 26a0630393 Replace ACRA with custom crash dialog
* Add uncaught exception handler that saves stacktraces to local crash log files
* Show a Compose crash dialog with stacktrace toggle and share action
* Register crash handler activity in a separate process with dialog theme
* Remove ACRA dependencies and configuration
* Add crash dialog strings and ignore `.hotswan/`
2026-05-23 21:59:12 +03:00
melod1n 3d153df79c Update README.md 2026-05-23 08:58:52 +03:00
melod1n 9061a39407 update Gitea workflow 2026-05-23 08:58:52 +03:00
melod1n d8c8820b32 add Gitea workflow 2026-05-22 20:45:42 +03:00
melod1n abfe25d051 fix signing 2026-05-22 17:46:56 +03:00
melod1n 574b230b26 feat: add channel message support and refactor UI components
- Implement `VkChannelMessage` domain and data models for channel message attachments
- Add `CHANNEL_MESSAGE` to `AttachmentType` and map it to relevant UI resources and strings
- Refactor `Sticker` and `Gift` composables to accept URL strings instead of domain objects for better decoupling
- Simplify `AppTheme` by removing redundant color animations and passing the color scheme directly to `MaterialExpressiveTheme`
- Update `LoginScreen` to include a theme toggle (classic vs. light) and improve back-button behavior by resetting error states
- Bump VK API version from 5.238 to 5.263
- Adjust layout and padding for sticker and gift attachment previews
2026-05-19 22:54:44 +03:00
melod1n b31c0f30c5 build: update gradle wrapper and build logic conventions 2026-05-19 13:28:10 +03:00
melod1n cb653eddc2 refactor(auth): reuse network ValidationType for validation flow
Remove duplicate auth ValidationType and use the shared network model instead.
Add support for both "sms" and "2fa_sms" SMS validation values.
2026-05-03 06:53:56 +03:00
melod1n df2c61d8d7 feat(auth): add web captcha handling
- replace manual captcha screen with WebView-based VK captcha flow
- handle captcha error 14 by showing the captcha overlay and retrying with success_token
- pass captcha redirect/result state through AppSettings
- remove old captcha ViewModel, navigation, validation, and DI
- add ACRA crash reporting
- add WIP message edit mode UI/state
- update Gradle wrapper, SDK config, and dependencies
2026-05-03 05:49:16 +03:00
dependabot[bot] 97c59a85b6 Chore(deps): Bump actions/upload-artifact from 6 to 7 (#252)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 21:01:31 +03:00
melod1n 155a3666ad bump app version code and name (#251) 0.2.3 2026-02-16 16:32:10 +03:00
melod1n ce375c902c Refactor: Improve reply component layout and styling
This commit refactors the `Reply` composable for better layout consistency and simplifies its implementation.

The `Reply` component no longer uses a fixed height, allowing it to dynamically resize based on its content. The layout has been updated from a `Box` to a `Row` to properly align the side indicator bar with the height of the text content. Padding and corner rounding logic has been simplified and centralized within the `Reply` composable itself, removing redundant parameters from the `MessageBubble`.

Key changes:
- `Reply` composable now uses `Row` for its root layout instead of `Box`.
- Removed the fixed `48.dp` height to allow dynamic content sizing.
- The side indicator bar's height now matches the text content's height.
- Simplified padding and shape logic in `MessageBubble` by removing conditional parameters passed to `Reply`.
- Adjusted padding inside `MessageBubble` to accommodate the new `Reply` layout.
2026-02-06 22:58:03 +03:00
melod1n 96b4fc8539 ui: improve Compose stability and message UI
- Add minute/second abbreviations and kotlin.time-based relative time formatter
- Introduce FastPreview and update previews to use AppTheme with dark/dynamic colors
- Refactor attachments preview grid & waveform to use ImmutableList and reduce recompositions
- Tweak message bubble reply styling and swipe-to-reply animation/haptics
- Add Compose Stability Analyzer plugin and enable it in debug builds
- Cache shared images by sha256 and improve share intent/chooser text
- Minor UX polish (e.g., “No views”) and immutability annotations
2026-02-06 22:14:01 +03:00
melod1n e3e9157dd5 Style: Update icons for message status and actions
This commit updates the icons used to indicate a message's status and within the message context menu. The outlined "star" and "edit" icons have been replaced with their filled variants for better visual distinction.

Key changes:
- Replaced `ic_star_round_24` with `ic_star_fill_round_24` for "important" messages in `DateStatus` and the "Mark as Important" action.
- Replaced `ic_edit_round_24` with `ic_edit_fill_round_24` for "edited" messages in `DateStatus`.
- Added the new `ic_edit_fill_round_24` drawable resource.
- In `MessageBubble`, the `derivedStateOf` for `shouldFill` is now wrapped in a `remember` block to prevent unnecessary recompositions.
2026-01-24 21:58:11 +03:00
melod1n 5aa28066d7 add icons to dialog in messages history
change icons fill color from @android:color/white to #ffffff
2026-01-24 21:49:28 +03:00
melod1n 1638d70ef2 update and refresh icons to Material Symbols;
update MaterialDialog style
2026-01-24 21:36:41 +03:00
melod1n 8c13d9e7e1 update some icons 2026-01-24 16:02:02 +03:00
melod1n 5dd829b6f6 change @android:color/white to #ffffff in icons 2026-01-24 15:28:13 +03:00
melod1n 2a238fa1bf Refactor: Upgrade Gradle and streamline build logic
This commit upgrades the project's build system and refactors the build logic for better maintainability and alignment with modern practices.

The Gradle version has been updated from 8.14.2 to 9.3.0, and the Android Gradle Plugin (AGP) has been upgraded to version 9.0.0. This required migrating the build logic to use the new `com.android.build.api.dsl` interfaces instead of the deprecated `com.android.build.gradle` ones.

Key changes:
- Upgraded Gradle to `9.3.0`.
- Upgraded Android Gradle Plugin to `9.0.0`.
- Updated various dependencies including Kotlin, Compose BOM, Chucker, and serialization.
- Removed the explicit `kotlin-android` plugin application, as it's now handled by AGP.
- Migrated build convention plugins to use the new AGP DSL APIs.
- Commented out the custom APK naming logic in `app/build.gradle.kts`.
- Added new `gradle.properties` flags for build configuration.
- Corrected the namespace in `core/model` from `datastore` to `model`.
2026-01-24 14:58:04 +03:00
melod1n 3f54961ac6 Build: Add support for Nexus repository
This commit updates the Gradle settings to allow specifying Nexus repositories for both plugins and dependencies. It reads the repository URLs from Gradle properties or environment variables (`NEXUS_PLUGINS_URL` and `NEXUS_MAVEN_URL`).

If these properties are set, the corresponding Nexus Maven repositories are added to the build configuration.
2026-01-24 11:35:16 +03:00
difome 045f2e8268 feat: add Ukrainian localization (#250) 2025-12-27 21:57:23 +03:00
melod1n 3eb33b2612 Refactor: Remove unused resources
This commit cleans up the `core/ui` module by removing unused drawable files and string resources.

Key changes:
- Deleted unused drawables: `ic_multimedia.xml`, `round_file_download_24.xml`, `round_install_mobile_24.xml`, and `round_play_arrow_24px.xml`.
- Removed a large number of unused string resources from `values/strings.xml` and `values-ru/strings.xml`, including strings related to calls, captchas, and duplicate actions.
2025-12-27 21:44:50 +03:00
melod1n f2d565fd3e Fix typo in Russian string resource
Corrects a spelling error in the Russian translation for `message_context_action_unmark_as_spam` in `core/ui/src/main/res/values-ru/strings.xml`.

- Changed "Помеьиьб как не спам" to "Пометить как не спам".
2025-12-27 21:36:17 +03:00
melod1n 7ab333280c Refactor: Clean up unused code and improve error handling
This commit performs a general cleanup of the codebase by removing unused dependencies, comments, and functions. It also improves error handling in the build logic.

Key changes:
- Removed a TODO and an inappropriate function `dickPizda` from `Extensions.kt`.
- Removed stale TODO comments from `core/data/build.gradle.kts` and `core/domain/build.gradle.kts`.
- Replaced a `TODO` call with a proper `IllegalArgumentException` in `KotlinAndroid.kt` for better error reporting when encountering unsupported project extensions.
2025-12-27 20:56:02 +03:00
melod1n 45ee0acea5 * refactor Conversation -> Convo
* extract Message and Convo mappers to core/domain module
* improve reply container text
2025-12-17 17:16:02 +03:00
melod1n 7b6571f208 Feat: Add animation to reply summary visibility
This commit wraps the reply summary `Text` composable within an `AnimatedVisibility` component. This ensures that the summary animates in and out of view smoothly when its content changes, preventing abrupt layout shifts.
2025-12-17 09:21:22 +03:00
melod1n 389d3f9e52 Style: Update message bubble colors
Updates the container colors for incoming and outgoing message bubbles to align with Material 3 design tokens.

- The outgoing message bubble container color is changed from `surfaceColorAtElevation(2.dp)` to `surfaceContainer`.
- The reply container color within an outgoing message is changed from `primaryContainer` to `surfaceContainerHighest`.

Additionally, the `@Preview` for `MessageBubble` is updated to display both an incoming and an outgoing message for better design validation.
2025-12-15 23:08:42 +03:00
melod1n 69a50f8fcd Refactor: Encapsulate MessageBubble colors
This commit refactors the `MessageBubble` composable by extracting the color logic into a private `messageBubbleColors` function. This function returns an immutable `MessageBubbleColors` data class, which holds the container, content, and reply container colors.

This change cleans up the main composable, improves readability, and centralizes color definitions for both incoming and outgoing messages. Additionally, the background color logic for attachments has been simplified to make it transparent for media types like stickers and videos.
2025-12-15 23:01:38 +03:00
melod1n 8839015249 Fix: Ensure sender's name truncates correctly in incoming messages
This commit resolves an issue where the sender's name in incoming message bubbles would not truncate properly, potentially breaking the layout. The fix ensures the name text correctly adapts to the width of the message bubble.

Additionally, this change introduces `ImmutableList` for message attachments to improve performance and refactors where the conversion to `ImmutableList` happens, moving it into the `MessageMapper`.

Key changes:
- The `MessageBubble` now reports its width, allowing the sender's name `Text` to be constrained correctly.
- Sender's name now uses `labelMedium` typography.
- Enabled showing the sender's name by default in `MessagesHistoryViewModelImpl`.
- Changed `UiItem.Message.attachments` from `List` to `ImmutableList` for better Compose performance.
- Moved the `toImmutableList()` conversion for attachments into the `MessageMapper`.
2025-12-15 22:58:50 +03:00
melod1n 478639e427 Refactor: Extract RootScreen from MainActivity and fix reply message user
This commit refactors the UI composition logic by extracting it from `MainActivity` into a new, dedicated `RootScreen` composable. This improves the separation of concerns and simplifies `MainActivity`.

Additionally, a bug has been fixed where a replied-to message would incorrectly display the author of the parent message instead of its own author.

Key changes:
- Moved theme setup, permission handling, Long-Poll/Online service management, and navigation graph hosting into the new `RootScreen.kt`.
- `MainActivity` is now significantly simplified, delegating its UI composition to `RootScreen`.
- Corrected the user and group assignment for `replyMessage` in `MessagesRepositoryImpl` to ensure the correct author is displayed.
- Introduced `OnlineFriendsViewModel` to the `FriendsRoute` to separate the logic for online friends.
- Replaced `List` with a custom `ImmutableList` for `photoViewerInfo` state to improve Compose stability.
2025-12-15 22:24:17 +03:00
dependabot[bot] dcbfd43896 Chore(deps): Bump actions/upload-artifact from 5 to 6 (#249)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-15 21:39:44 +03:00
melod1n 7b2c102470 feat(messages): Implement "message read by" counter
This commit introduces the ability to see how many people have read an outgoing message in a group chat. A "views" count is now displayed in the message options dialog for relevant messages.

- **API & Data Layer:**
  - Added `getMessageReadPeers` to `MessagesService` and `MessagesRepository` to fetch users who have read a specific message.
  - Introduced `MessagesGetReadPeersResponse` to handle the API response.
  - A new URL constant `GET_MESSAGE_READ_PEERS` was added.

- **Domain Layer:**
  - A new `GetMessageReadPeersUseCase` is created to provide the view count to the ViewModel.
  - The use case is registered in the `DomainModule`.

- **ViewModel:**
  - `MessagesHistoryViewModel` now includes `loadMessageReadPeers` to asynchronously fetch and return the view count for a message.

- **UI (Compose):**
  - The `MessageOptionsDialog` now displays a "views" count for outgoing chat messages.
  - It uses a `LaunchedEffect` to call `loadMessageReadPeers` when the dialog is shown.
  - The `visibility` icon has been updated and its XML file renamed to `round_visibility_24px.xml` to follow a consistent naming convention.

- **Refactoring & Minor Fixes:**
  - Simplified several `derivedStateOf` usages to direct calculations or property delegates in `MessageBubble.kt` and `MessagesList.kt` for minor performance improvements.
  - Renamed `IncomingMessageBubble.kt` and `OutgoingMessageBubble.kt` to `MessageBubbleIncoming.kt` and `MessageBubbleOutgoing.kt` respectively for consistency.
  - Removed an unnecessary log statement in `MessagesList.kt`.
2025-12-06 14:37:08 +03:00
melod1n 5310596cf6 Refactor: Improve swipe-to-dismiss and image sharing
This commit refactors the swipe-to-dismiss gesture and the image sharing logic in the photo viewer.

The swipe-to-dismiss animation is now smoother and more reliable, using `Animatable` instead of `animateFloatAsState`. The background dimming effect has also been improved to be more responsive to the drag gesture.

Additionally, the responsibility for creating the share `Intent` has been moved from the composable screen into the `PhotoViewViewModel`, improving the separation of concerns.

Key changes:
- Replaced `animateFloatAsState` with `Animatable` for smoother swipe-to-dismiss animations.
- Improved the alpha calculation for the background during the drag gesture.
- Moved the creation of the share `Intent` into the `PhotoViewViewModel`.
- Simplified the drag-handling logic by removing local state management from the composable.
2025-12-06 09:00:01 +03:00
melod1n 65ff74622a Update README.md 2025-12-06 03:39:25 +03:00
melod1n f48878f003 Refactor: Implement swipe-to-reply and redesign input bar
This commit introduces the ability to reply to a message by swiping it to the right. The message input bar and related components have been redesigned and refactored for a cleaner look and better user experience.

Key changes:
- Added a swipe-to-reply gesture on message bubbles.
- Redesigned the message `InputBar` with updated styling, animations, and rounded corners that adapt to the reply state.
- Renamed `MessagesHistoryInputBar` to a more generic `InputBar`.
- Introduced `FastTextField`, a customized `BasicTextField`, for better performance and control.
- Replaced `IconButton` with `FastIconButton` and `RippledClickContainer` in several places for consistent click handling.
- Refactored `PinnedMessageContainer` and `ReplyContainer` with improved UI.
- Updated the Compose BOM to `2025.12.00`.
2025-12-06 03:35:14 +03:00