This commit enhances the pagination logic in the ChannelScreen to improve message loading behavior.
- Introduced a new `isNearBottom` state to detect when the user is near the bottom of the message list, triggering loading of newer messages.
- Refactored the existing pagination logic to handle both loading older messages when near the top and newer messages when near the bottom.
- Added logic to preserve the scroll position when new messages are loaded, ensuring a smoother user experience.
- Improved logging for better debugging and tracking of pagination events.
This commit introduces improvements to the channel navigation and message handling within the chat application.
- Updated `ActionChannel` to include an optional `messageId` parameter in the `SwitchChannel` action for better context during channel switches.
- Modified `ChatRouterScreen` to parse and handle the new `messageId` parameter when navigating to channels.
- Enhanced `ChannelScreen` to load messages around a specified `messageId`, allowing users to jump directly to important messages.
- Implemented highlighting for the targeted message in the `ChannelScreen` to improve user experience.
- Updated `ChannelScreenViewModel` to support the new message loading logic based on the `messageId` parameter.
- Refactored related components to ensure clean architecture principles are maintained and improve overall code organization.
This commit refactors various components across the application to improve maintainability and readability.
- Updated `AndroidManifest.xml` to streamline activity declarations and intent filters.
- Refined `build.gradle.kts` for better dependency management and project configuration.
- Improved proguard rules for better code obfuscation and optimization.
- Enhanced documentation in `README.md` and `README_APP_LINKS.md` for clarity on app links and setup.
- Refactored multiple Kotlin files to adhere to clean architecture principles, ensuring better separation of concerns and modularity.
- Optimized imports and removed unused code across various files to reduce clutter and improve performance.
- Updated UI components to align with Material 3 design guidelines, enhancing the overall user experience.
This commit introduces deep linking capabilities to the application.
- Added `DeepLinkActivity` to handle incoming deep links and navigate users to the appropriate content within the app.
- Created `DeepLinkUtils` to provide utility functions for parsing and creating deep link URIs.
- Updated `MainActivity` to receive and process deep link data from `DeepLinkActivity`.
- Modified `ChatRouterScreen` and its `ViewModel` to handle navigation based on deep link parameters.
- Updated `AndroidManifest.xml` to include intent filters for `DeepLinkActivity` to capture relevant URL schemes and paths.
- Added `assetlinks.json` and `README_APP_LINKS.md` to support Android App Links verification.
- Changed the `applicationId` in `app/build.gradle.kts` from "chat.revolt" to "chat.peptide".
- Renamed project in `.idea/.name` from "PEP" to "Revolt".
- Changed the default route in `ChatRouterScreen` from `Settings` to `Home`.
This commit introduces deep linking capabilities to the application.
- Added `DeepLinkActivity` to handle incoming deep links and navigate users to the appropriate content within the app.
- Created `DeepLinkUtils` to provide utility functions for parsing and creating deep link URIs.
- Updated `MainActivity` to receive and process deep link data from `DeepLinkActivity`.
- Modified `ChatRouterScreen` and its `ViewModel` to handle navigation based on deep link parameters.
- Updated `AndroidManifest.xml` to include intent filters for `DeepLinkActivity` to capture relevant URL schemes and paths.
- Added `assetlinks.json` and `README_APP_LINKS.md` to support Android App Links verification.
- Changed the `applicationId` in `app/build.gradle.kts` from "chat.revolt" to "chat.peptide".
- Renamed project in `.idea/.name` from "PEP" to "Revolt".
- Changed the default route in `ChatRouterScreen` from `Settings` to `Home`.
- Add `setDefaultPlatformOnCreate` function to `MainActivityViewModel` to initialize the application platform from storage when the app starts. If the platform is not found or invalid, the user is logged out.
- Call `setDefaultPlatformOnCreate` in `MainActivity.onCreate`.
- Add `fromName` companion function to `ApplicationPlatform` enum to retrieve a platform by its name string.
This commit enhances the error handling and user interface in `DiscoverServersList.kt`.
- Improved loading indicator alignment by centering it within a `Box` that takes up available space.
- Added a retry mechanism for scenarios where loading servers fails or no servers are found. This includes:
- Displaying an error message.
- Providing a "Retry" button (`SquareButton`) that triggers `viewModel::loadServers` on click.
- Centering the error message and retry button within the screen.
This commit adds two new composable functions, SquareButton and SquareElevatedButton, to standardize button styling across the application. The new components encapsulate the button shape and styling, promoting code reuse and cleaner UI implementation.
- Created SquareButton for standard button functionality with customizable onClick and content.
- Created SquareElevatedButton for elevated button functionality with similar customization options.
- Replaced instances of Button and ElevatedButton in various screens with the new SquareButton and SquareElevatedButton components for consistency and improved maintainability.
This commit enhances the visual elements of the ChannelSideDrawer and ChatRouterScreen components by updating icons and background colors for improved aesthetics and consistency.
- Replaced icons in ChannelSideDrawer with new resources for direct messages and friends.
- Updated background colors in ChannelSideDrawer to use primaryContainer and secondaryContainer for better visual hierarchy.
- Adjusted icon sizes in ChatRouterScreen's navigation bar for uniformity.
- Introduced new drawable resources for bottom navigation icons, enhancing the overall UI experience.
This commit enhances the layout structure of the ChannelSideDrawer component by reorganizing the placement of UI elements for better readability and visual separation.
- Moved the HorizontalDivider to encapsulate the ChannelItem for SavedMessages, improving the visual hierarchy.
- Removed redundant divider items and adjusted spacing for a cleaner layout.
- Ensured consistent padding and alignment for UI elements within the drawer.
This commit enhances the ChannelSideDrawer component by replacing hardcoded strings with string resources, improving localization support and maintainability.
- Updated content description for empty messages image.
- Replaced static text with string resources for empty messages heading and body.
- Updated text for the new conversation button to use string resources.
This commit adds a preview for the DirectMessagesChannelListRenderer in the ChannelSideDrawer component, improving the development experience by allowing for visual testing of the UI. Additionally, it cleans up the code by formatting and organizing imports.
- Introduced @Preview for DirectMessagesChannelListRenderer.
- Cleaned up import statements for better readability.
- Adjusted spacing and formatting for improved code clarity.
This commit removes unused imports from the ChannelSideDrawer component, streamlining the code and improving readability.
- Removed unnecessary imports related to FloatingActionButton and ToggleFloatingActionButton.
- Cleaned up imports for better maintainability.
This commit improves the UI of the ChannelIcon and ChannelSideDrawer components by adding background styling and padding to the ChannelIcon for SavedMessages. Additionally, it introduces a FloatingActionButton in the ChannelSideDrawer for quick navigation to the Friends screen, enhancing user experience.
- Updated ChannelIcon to include a circular background and padding for SavedMessages.
- Added FloatingActionButton in ChannelSideDrawer for navigating to Friends screen.
- Updated string resource for channel notes to "Saved Notes".
This commit removes the drawer functionality from the chat screens and updates navigation accordingly.
- Removed `drawerIsOpen` parameter and related logic from `RegularMessage.kt` and `ChannelScreen.kt`.
- Updated `ChannelScreen.kt` to navigate back to the channels screen or invoke a custom back action instead of toggling the drawer.
- Removed `onToggleDrawer` parameter from `ChannelScreen` invocation in `MainActivity.kt`.
- Simplified navigation logic in `ChatRouterScreen.kt` by removing drawer state handling and updating conditions for selected bottom navigation items.
- Updated styling for `ChannelSideDrawer.kt` by replacing `MaterialTheme.shapes.medium.copy` with `RoundedCornerShape` for top start corner rounding.
This commit introduces a new feature to display server-specific colors in the discover servers list and includes several UI refinements.
- Added `showColor` property to `ServerData` to allow servers to specify a display color.
- Updated `DiscoverServersList` to parse and apply `showColor` to server items.
- Removed animated visibility for status bar spacer in `FriendsScreen` top bar.
- Changed `LargeTopAppBar` to `TopAppBar` in `SettingsScreen`.
- Adjusted corner radius for the server banner in `ChannelSideDrawer`.
- Removed `asSerialisedString()` function and `defaultForDMList` from `ChatRouterScreen.kt` as they were unused.
- Simplified `navigateToServer` in `ChatRouterScreen.kt` by removing logic to fetch and validate the last channel.
- Removed unused imports and `serverInfoOffset` from `ChannelSideDrawer.kt`.
- Removed bottom padding for the logout button in `SettingsScreen`.
- Replaced `Scaffold` with `Column` and removed padding from its content in `SettingsScreen`.
- Removed `Spacer` for status bar height in `ChannelSideDrawer`.
- Updated padding for the server list in `DiscoverServersList`.
- Removed unused `Spacer` at the end of the server list in `DiscoverServersList`.
- Applied inner padding to the `Column` in `ChatRouterScreen`.
- Reordered "Discover" and "Add Server" buttons and updated their styling in `ChannelSideDrawer`.
- Adjusted the server banner height and removed the offset for server info in `ChannelSideDrawer`.
- Updated `ServerItem` to accept `isJoined` as a parameter.
- Modified the joined server indicator to use primary theme colors and adjusted its size.
- Added `@Preview` composables for `ServerItem` in both joined and not joined states.
- Remove unused `RevoltTweenColour` animation spec.
- Remove KDoc for `isServerAlreadyJoined` function.
- Change exception variable names to `_` to indicate they are unused.
- Added `disabled` property to `ServerData` to indicate if a server can be joined.
- Updated `ServerItem` to reflect the `disabled` state by adjusting content alpha and added a visual indicator for joined servers.
- Modified `ServerInviteDialog` to improve the display of error messages and updated the dialog's icon.
- Changed the behavior in `DiscoverServersList` to navigate directly to server channels if already joined, otherwise proceed with the invite flow.
- Updated `icn_check_24dp.xml` and added `link_no_valid_img.xml`.
- Updated string resources for server invite errors.
- Modified back navigation in `MainActivity` from discover screen to navigate to "main".
- Renamed project from Revolt to PEP in `.idea/.name`.
- Modified `DiscoverServersList` to accept an `onJoinToServerSuccess` callback, which is invoked with the server ID upon successful joining.
- Updated `ServerInviteHandler` to pass the server ID to the `onJoinSuccess` callback.
- Integrated the `onJoinToServerSuccess` callback in `ChannelSideDrawer` to navigate to the joined server after a successful join from the discover servers list.
- Introduced a single `DiscoverUiState` data class to encapsulate all UI-related states for the discover servers screen.
- Refactored `DiscoverServersListViewModel` to utilize the new UI state, simplifying state management and improving readability.
- Updated `DiscoverServersList` to collect and use the consolidated UI state, enhancing the handling of loading, error, and server data.
- Modified `ServerInviteHandler` to leverage the new UI state for better error and invite data management.
- Improved code cleanliness by removing redundant state flows and variables.
- Added a new state flow for loaded errors in `DiscoverServersListViewModel` to manage server loading errors.
- Implemented `joinServerWithoutProcessingIndicator` method to join servers without affecting the loading state in the UI.
- Updated `ServerInviteDialog` to display a loading indicator while joining a server and improved error handling.
- Modified `ServerInviteHandler` to utilize the new error state and streamline the dialog's behavior.
- Added a new string resource for the joining state message to enhance user feedback.
- Changed the base URL for the PEP platform in `RevoltAPI.kt` to `https://pepchat.io/api`.
- Updated the `DiscoverServersList` to handle server invites more effectively by passing the server ID to the `ServerInviteHandler`.
- Enhanced `ServerInviteHandler` to utilize pre-loaded invite data and manage loading states.
- Modified `ServerInviteDialog` to improve UI elements and added previews for different states.
- Updated string resources for invite dialog messages to enhance clarity and user experience.
- Updated `websocket` URL to use `wss` scheme and point to `a-pep.peptide.chat/ws`.
- Changed `autumn` URL to `a-pep.peptide.chat/autumn`.
- Added TODO comments to `kjbook` URL indicating it needs to be replaced with the correct URL.
- Removed unused imports and variables in `DiscoverServersList.kt`, `ServerInviteHandler.kt`, and `ServerInviteDialog.kt` to improve code cleanliness.
- Deleted the unused `getServerCategories` function from `ServerDataRepository.kt`.
- Added `ServerInviteHandler.kt` and `ServerInviteDialog.kt` to manage and display server invite information and allow users to join servers.
- Updated `DiscoverServersListViewModel.kt` to include logic for fetching invite details and joining servers.
- Modified `DiscoverServersList.kt` to trigger the server invite dialog when a server item is clicked and to handle the invite code.
- Added `inviteCode` field to `ServerData` in `ServerDataRepository.kt`.
- Removed unused `DiscoverViewModel.kt`.
- Added new string resources for invite dialog messages and member count.
- Updated `DiscoverServersList` to refine UI elements:
- Removed background modifier and lazy list state.
- Adjusted padding, spacing, and image resources for server items.
- Replaced `UserAvatar` with a generic `Image` for server icons.
- Added an `IconButton` for server selection.
- Added extra space at the bottom of list.
- Simplified `DiscoverViewModel` by removing filtering logic, selected category, search query, and server acknowledgement functionality.
- Streamlined `ServerData` in `ServerDataRepository.kt` by removing several fields: `iconUrl`, `bannerUrl`, `memberCount`, `category`, `tags`, `isVerified`, and `isOfficial`.
- Added a new drawable resource `three_person.xml`.
- Updated `ChannelSideDrawer.kt` to use `safeDrawingPadding()` for better handling of system UI elements.
- Implemented the DiscoverServersList composable to display a list of servers.
- Introduced ServerItem composable for individual server representation.
- Added a new drawable resource for the discover character image.
- Integrated loading and error states within the server list display.
- Removed unused imports and rearranged existing ones in `OnboardingScreen.kt` for better code organization.
- Removed back navigation button from `SettingsScreen.kt` for a cleaner UI experience.
- Remove unused `DefaultButtonStyle` class.
- Update `OnboardingScreen` to remove import of deleted class.
- Update `SettingsScreen` logout navigation from "login/greeting" to "choose-platform".
- Add padding to the logout button in `SettingsScreen`.
This commit updates the `RevoltAPI` to include a new `autumn` URL and modifies the `ProfileSettingsScreenViewModel` to utilize the new method for retrieving profile images and backgrounds. Key changes include:
- Added `autumn` URL to the `PlatformUrls` data class and updated the `PLATFORM_URLS` map.
- Refactored image URL construction in `ProfileSettingsScreenViewModel` to use `RevoltAPI.getCurrentAutumnUrl()` for dynamic URL generation.
These changes improve code maintainability and ensure consistent URL handling across the application.
This commit refines the API references throughout the application to utilize the new `RevoltAPI` structure, enhancing maintainability and clarity. Key changes include:
- Replaced all instances of `REVOLT_FILES`, `REVOLT_BASE`, and other constants with calls to `RevoltAPI` methods for dynamic URL generation.
- Introduced an `ApplicationPlatform` enum to manage platform-specific URLs, allowing for easier switching between Revolt and PepChat.
- Updated various screens and components to reflect the new API structure, ensuring consistent URL handling across the application.
- Enhanced the `ChoosePlatformScreen` to set the selected platform and navigate accordingly.
These changes improve the overall architecture and prepare the codebase for future enhancements.
- Add DefaultButtonStyle class for consistent button styling.
- Update button shapes across various screens to improve UI consistency.
- Modify string resources for better clarity and engagement.
- Introduce new drawable resources for enhanced visual elements.
- Update login screen to navigate to registration details on "Register" click.
- Modify registration screen to navigate back to login and update image resource.
- Revise onboarding strings for a more engaging user experience.
This commit refines the navigation and channel management within the chat interface.
Key changes include:
- Introduced a new `backToChannelsScreen` callback in `AppEntrypoint` and `ChannelScreen` to facilitate navigation back to the channels.
- Updated `ChatRouterDestination` to include `ServersChannels` and modified the logic to handle channel navigation correctly.
- Adjusted the `ChannelSideDrawer` to reflect the new routing logic, ensuring the correct channel is displayed based on the current server.
- Removed the back navigation button from the `SettingsScreen` for a cleaner UI experience.
- Updated the `ChannelNavigator` to handle the new `Settings` destination and ensure proper rendering of the `SettingsScreen`.
- Enhanced the `Sidebar` component to support navigation to the `Settings` screen and manage server-specific channels effectively.
This commit introduces a bottom navigation bar to the chat interface.
Key changes include:
- Added a `Scaffold` with a `BottomAppBar` in `ChannelNavigator`.
- The `BottomAppBar` contains `NavigationBarItem`s for "Home", "Friends", and "You" (Overview).
- The "Home" destination now displays the `Sidebar`.
- Removed the tablet-aware UI logic and the dismissible navigation drawer implementation.
- Simplified `ChannelNavigator` parameters, removing `useDrawer`, `disableBackHandler`, `onEnterVoiceUI`.
- Updated screen composables (`FriendsScreen`, `NoCurrentChannelScreen`, `ChannelScreen`, `OverviewScreen`) to remove the `useDrawer` parameter and its associated logic, as the drawer is no longer directly managed by these screens.
- Removed `drawerState` parameter from `ChannelSideDrawer` and related components, as drawer state is now managed differently.
- Removed logic related to closing the drawer on item clicks within `ChannelSideDrawer`.
- Added a new `ChatRouterDestination.Home`.
- Request for `POST_NOTIFICATIONS` permission is now correctly using `Manifest.permission.POST_NOTIFICATIONS`.
This commit introduces a bottom navigation bar to the chat interface.
Key changes include:
- Added a `Scaffold` with a `BottomAppBar` in `ChannelNavigator`.
- The `BottomAppBar` contains `NavigationBarItem`s for "Home", "Friends", and "You" (Overview).
- The "Home" destination now displays the `Sidebar`.
- Removed the tablet-aware UI logic and the dismissible navigation drawer implementation.
- Simplified `ChannelNavigator` parameters, removing `useDrawer`, `disableBackHandler`, `onEnterVoiceUI`.
- Updated screen composables (`FriendsScreen`, `NoCurrentChannelScreen`, `ChannelScreen`, `OverviewScreen`) to remove the `useDrawer` parameter and its associated logic, as the drawer is no longer directly managed by these screens.
- Removed `drawerState` parameter from `ChannelSideDrawer` and related components, as drawer state is now managed differently.
- Removed logic related to closing the drawer on item clicks within `ChannelSideDrawer`.
- Added a new `ChatRouterDestination.Home`.
- Request for `POST_NOTIFICATIONS` permission is now correctly using `Manifest.permission.POST_NOTIFICATIONS`.
- Add "Continue" string resource for navigation
- Update login screen heading to "Welcome back!"
- Add login subheading "Great to see you again!"
- Update registration form heading to "Make it Official!"
- Change registration data text to "New Here? Let's Get You Set Up!"
- Change platform button text from "Login" to "Confirm"
- Set API URL to "https://api.revolt.chat" for both platform options
Add platform selection UI with PepChat and Revolt options
Implement clickable platform cards that set the API URL
Create custom styled text field for API URL input
Add confirm button with localized string resource
Fix vertical alignment of placeholder text in text field
Add platform selection UI with PepChat and Revolt options
Implement clickable platform cards that set the API URL
Create custom styled text field for API URL input
Add confirm button with localized string resource
Fix vertical alignment of placeholder text in text field