-
Notifications
You must be signed in to change notification settings - Fork 0
Update ProfileScreen to properly use ProfileUiState and display Projects count #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
TheRealAshik
wants to merge
23
commits into
master
from
feature/update-profile-screen-15598241077014123616
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8b1dc26
feat: Implement HomeScreen UI with mock data and strictly enforce no …
TheRealAshik b5d6400
Implement Repository and Pull Request screens
TheRealAshik f527295
feat: Implement Inbox and Explore screens UI
TheRealAshik 2cfb519
feat: implement profile and repository list screens
TheRealAshik fe1a86e
Merge feat/inbox-explore-ui: resolve strings.xml conflict
TheRealAshik c13b26f
Merge feature/home-screen-ui: resolve strings.xml and MainScreen.kt c…
TheRealAshik 9eeb2c4
Merge feature/implement-profile-and-repository-lists: resolve conflicts
TheRealAshik da59733
ci: add workflow_dispatch and develop branch trigger
TheRealAshik 5b4ce11
fix: resolve Dimens JVM signature clash by unifying to PascalCase con…
TheRealAshik 8efcb48
feat: Implement settings, notification options, code options, and acc…
TheRealAshik 182444e
Merge feat/settings-screens: add settings strings
TheRealAshik 1d31540
fix: replace hardcoded black with M3 light/dark color schemes
TheRealAshik 12a1e4c
docs: update AGENTS.md with light/dark theme and Dimens rules
TheRealAshik 6543b08
chore: remove parse_and_replace.py
TheRealAshik bd87889
Add Jetpack Navigation, PAT auth, and data layer
TheRealAshik f76ef65
feat: replace mock data with real GitHub API in Home and Profile screens
TheRealAshik f27dacf
feat: replace mock data with real GitHub API in RepositoryList screen
TheRealAshik 2c4ffb9
fix: add missing retry string resource
TheRealAshik 32c5e29
fix: replace hardcoded strings with stringResource
TheRealAshik 16f44da
fix: add INTERNET permission and wire profile tab navigation
TheRealAshik cd4c525
Fix top app bar spacing and wire profile navigation
TheRealAshik 2aa9e7b
Fix broken IconButton syntax in HomeScreen
TheRealAshik bc65a54
Update ProfileScreen to properly use ProfileUiState and display Proje…
TheRealAshik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,9 @@ on: | |
| push: | ||
| branches: | ||
| - master | ||
| - develop | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| android: | ||
|
|
||
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
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
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
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
27 changes: 27 additions & 0 deletions
27
composeApp/src/androidMain/kotlin/dev/therealashik/github/data/TokenStorage.android.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package dev.therealashik.github.data | ||
|
|
||
| import android.annotation.SuppressLint | ||
| import android.content.Context | ||
| import android.content.SharedPreferences | ||
|
|
||
| private class AndroidTokenStorage(context: Context) : TokenStorage { | ||
| // TODO: Replace with EncryptedSharedPreferences for production | ||
| private val prefs: SharedPreferences = | ||
| context.getSharedPreferences("github_prefs", Context.MODE_PRIVATE) | ||
|
|
||
| override fun saveToken(token: String) { prefs.edit().putString(KEY, token).apply() } | ||
| override fun getToken(): String? = prefs.getString(KEY, null) | ||
| override fun clearToken() { prefs.edit().remove(KEY).apply() } | ||
|
|
||
| companion object { private const val KEY = "pat_token" } | ||
| } | ||
|
|
||
| @SuppressLint("StaticFieldLeak") | ||
| private var appContext: Context? = null | ||
|
|
||
| fun initTokenStorage(context: Context) { | ||
| appContext = context.applicationContext | ||
| } | ||
|
|
||
| actual fun createTokenStorage(): TokenStorage = | ||
| AndroidTokenStorage(checkNotNull(appContext) { "Call initTokenStorage(context) in MainActivity.onCreate" }) | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storing Personal Access Tokens (PAT) in plain text using
SharedPreferencesis insecure. As noted in the TODO, this should be replaced withEncryptedSharedPreferencesfrom the Jetpack Security library to ensure sensitive credentials are encrypted at rest.