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
[🆕] Manage pledge menu #588
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a9c1390
wip backing fragment
eoji cad2aad
wip showing and hiding rewards and backing fragments
eoji 1bbbebf
- ProjectActivity displays BackingFragment as the primary screen when…
eoji ed70142
Feedback from Nino
eoji de54975
the alphabet eludes me
eoji File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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,5 @@ | ||
package com.kickstarter.ui.data | ||
|
||
enum class PledgeReason { | ||
PLEDGE, UPDATE_PAYMENT, UPDATE_PLEDGE | ||
} |
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/kickstarter/ui/fragments/BackingFragment.kt
This file contains 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,24 @@ | ||
package com.kickstarter.ui.fragments | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import com.kickstarter.R | ||
import com.kickstarter.libs.BaseFragment | ||
import com.kickstarter.libs.qualifiers.RequiresFragmentViewModel | ||
import com.kickstarter.models.Project | ||
import com.kickstarter.viewmodels.BackingFragmentViewModel | ||
|
||
@RequiresFragmentViewModel(BackingFragmentViewModel.ViewModel::class) | ||
class BackingFragment: BaseFragment<BackingFragmentViewModel.ViewModel>() { | ||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { | ||
super.onCreateView(inflater, container, savedInstanceState) | ||
return inflater.inflate(R.layout.fragment_backing, container, false) | ||
} | ||
|
||
fun takeProject(project: Project) { | ||
this.viewModel.inputs.project(project) | ||
} | ||
|
||
} |
This file contains 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 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
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.
What happens when we have two methods with the same name? I see that we have another
renderProject
above with a different function signature. Is it able to detect which one to invoke based on the arguments?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.
Yep! I was considering naming it
renderProjectInFragments
but it's kinda long and redundant.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.
I guess I'm still learning how the files in this codebase are structured and what the purpose of each of these functions are. It looks like the one above renders an action button for the project? Could it be something like
renderProjectActionButton
or is that too specific? (disregard if I misunderstood)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.
ooh it's doing more than that. It's loading the project into the
ProjectAdapter
, loading the old style rewards if the native checkout flag is off, and configuring the button