Implemented homepage directory API with cache-first loading#128
Closed
Ris-git wants to merge 104 commits into
Closed
Implemented homepage directory API with cache-first loading#128Ris-git wants to merge 104 commits into
Ris-git wants to merge 104 commits into
Conversation
This commit adds the license files for BSD and ML Kit to the compliance directory and updates the build.gradle.kts file to include them in the license check. It also updates the .idea/misc.xml file with some minor changes.
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
- 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
Change splash and app foreground icon
Change auth design to pep
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`.
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.
- 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.
- 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.
…-drawer-to-bottom-bar Change main screen design from drawer to bottom bar
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.
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.
Fix/feedback 01
This commit updates the project name in the .idea/.name file.
- 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`.
- 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.
…able - 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.
- 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.
- Removed `safeContentPadding` and `safeDrawingPadding` imports from `ChannelSideDrawer.kt` as they were no longer in use.
- 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.
- 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`.
- 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.
This commit introduces the following changes:
- Adds a new vector drawable `icn_message_to_user.xml`.
- Updates `UserInfoSheet.kt`:
- Removes the user card feature flag check for displaying server identity options.
- Changes the message button text from "Message Friends" to "Message".
- Updates the message button icon to the new `icn_message_to_user` drawable.
- Adds a new string resource "message".
This import is no longer needed after recent refactoring.
This commit introduces a new page to the server context sheet that allows users to manage their notification settings for the server. Users can now choose between the following notification options: - Use default - Muted - All messages - Mentions only - None The sheet now uses an `AnimatedContent` composable to switch between the main server information page and the new notification settings page.
This commit removes the Sentry error reporting integration from the application.
Specific changes:
- Removed Sentry dependencies and plugin from `app/build.gradle.kts`.
- Commented out Sentry initialization and usage in `MainActivity.kt`.
- Commented out Sentry API calls in various files:
- `OverviewScreen.kt`
- `ChatRouterScreen.kt`
- `AppAPI.kt`
- Commented out Sentry meta-data in `AndroidManifest.xml`.
- Removed `sentry.properties` from `.gitignore`.
- Updated `lintOptions` in `app/build.gradle.kts` to set `checkReleaseBuilds = false`.
- In `ChatRouterScreen.kt`, when `showChannelUnavailableAlert` is dismissed or confirmed, set the destination to `ChatRouterDestination.Discover`.
Feat/messages deeplink
This commit renames the `peptide` field to `revolt` in the `Root` data class and updates its usage in the `AboutScreen` to reflect this change.
- Set softInputMode to SOFT_INPUT_ADJUST_PAN to prevent keyboard from obscuring UI elements. - Use `SecureTextField` for password input to provide obfuscation and a toggle to show/hide password. - Make the screen vertically scrollable.
This commit introduces several improvements to the navigation and user interface, primarily focused on the channel screen and login/registration flows. **Channel Screen & Navigation:** - Implement swipe-to-go-back gesture on the ChannelScreen. - Persist the ChannelSideDrawer as a background layer when a channel is open. This allows for a smoother transition when returning to the channel list. - Allow swiping from the left edge of the screen (when not in a channel view) to reopen the last viewed channel. - Ensure the correct channel is highlighted in the ChannelSideDrawer when a channel is active. - The back button on the ChannelScreen now navigates to the previous non-channel screen or the server's channel list, providing a more intuitive backstack behavior. **Login/Registration:** - Disable HTTP request retries for login attempts to prevent unexpected behavior with MFA or incorrect credentials. - Add loading indicators to the Login and RegisterDetails screens to provide visual feedback during network operations. - Display error messages more prominently on the Login and RegisterDetails screens. - Adjust the soft input mode on the LoginScreen to `SOFT_INPUT_ADJUST_PAN` to prevent UI elements from being obscured by the keyboard. - Fix a bug where the default notification type was incorrectly mapped. **Other Changes:** - Update the monochrome notification icon. - Modify the primary color in `colors.xml`. - Minor cleanups and toast message improvements in ChannelScreen camera handling.
This change ensures that the last selected channel remains highlighted in the channel list even when navigating to other screens like server settings. The `lastSelectedChannelId` is updated whenever a channel destination is navigated to. This stored ID is then used to determine the `selectedChannelId` for the `ServerChannels` composable, ensuring the correct channel remains visually selected.
The app name "Peptide" has been changed to "PepChat" in the strings.xml resource file.
This commit introduces a new bottom sheet that allows users to add or remove members from a group directly from the channel info screen. - A new "Add Members" button is now available in the `ChannelInfoSheet` for group chats. - Tapping this button opens the `AddMemberToGroupSheet`, which lists all friends. - Users can search for friends and add or remove them from the group. - The "Manage Notifications" button is now hidden for group chats. Additionally, this commit includes the following changes: - **Changelog**: The changelog fetching and display functionality has been temporarily disabled. - **Splash Screen**: The splash screen icon has been updated and now uses an inset drawable (`splash_screen_icon_square.xml`) to adjust its padding, which also resolves an icon display issue on Android 13. - **Build**: All build variants are now signed with the debug key to simplify development builds.
Provides build commands, architecture overview, and code organization for future Claude Code instances working in this repository. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Implemented homepage server listing using the new Public Servers API, added cache-first loading with background refresh, and retained Google Sheets fallback support.
Changes :
1. Added Public Servers API integration
2. Kept Google Sheets as fallback source
3. Added cache-first loading for discover servers
4. Added background refresh mechanism
5. Reduced API calls by using cached data
Files Changed :
1. PublicServersApi.kt
2. ServerDataRepository.kt
3. PeptideApplication.kt
4. DiscoverServersListViewModel.kt