-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Release] Feature Instance - sub feature "Delete Interests" #33
* [release note] - [feature-instance] --> sub feature complete "Delete Interests"
- Loading branch information
Showing
29 changed files
with
433 additions
and
48 deletions.
There are no files selected for viewing
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
app/src/androidTest/assets/features/instance/remove_interests.feature
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,13 @@ | ||
Feature: Remove Interests | ||
User can remove interests | ||
|
||
Background: | ||
Given I am on the "Instance" screen | ||
And I add "reddit" as an interest | ||
And I add "upwork" as an interest | ||
|
||
Scenario: User removes interests from home screen | ||
When I remove "reddit" as an interest | ||
And I should not see "reddit" as an interest | ||
And I should see "upwork" as an interest | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
3 | ||
$f01c5292-b45b-4f4b-92d3-4c4ce0252138* interest1 | ||
3 | ||
$159cf703-f220-4979-8590-b09288ea35a0* interest2 | ||
3 | ||
$518926a5-0cef-4a1b-a6db-1f910a28e96d* interest3 | ||
interest1* interest1 | ||
interest2* interest2 | ||
interest3* interest3 |
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,7 @@ | ||
|
||
3 | ||
$f01c5292-b45b-4f4b-92d3-4c4ce0252138* interest1 | ||
3 | ||
$159cf703-f220-4979-8590-b09288ea35a0* interest2 | ||
3 | ||
$518926a5-0cef-4a1b-a6db-1f910a28e96d* interest3 |
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
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
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
12 changes: 0 additions & 12 deletions
12
app/src/main/java/com/github/syedahmedjamil/pushernotif/ui/instance/InstanceAdapter.kt
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...ain/java/com/github/syedahmedjamil/pushernotif/ui/instance/InstanceInterestListAdapter.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,32 @@ | ||
package com.github.syedahmedjamil.pushernotif.ui.instance | ||
|
||
import android.content.Context | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import android.widget.ArrayAdapter | ||
import com.github.syedahmedjamil.pushernotif.databinding.InterestListItemBinding | ||
|
||
|
||
class InstanceInterestListAdapter( | ||
context: Context, | ||
resource: Int, | ||
private val viewModel: InstanceViewModel | ||
) : | ||
ArrayAdapter<String>(context, resource) { | ||
|
||
override fun getView( | ||
position: Int, | ||
convertView: View?, | ||
parent: ViewGroup | ||
): View { | ||
val binding = convertView?.tag as? InterestListItemBinding ?: | ||
InterestListItemBinding.inflate(LayoutInflater.from(context), parent, false) | ||
|
||
val item = getItem(position) | ||
binding.viewmodel = viewModel | ||
binding.name = item | ||
|
||
return binding.root | ||
} | ||
} |
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,8 @@ | ||
<vector android:height="24dp" android:tint="#545454" | ||
android:viewportHeight="24" android:viewportWidth="24" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillAlpha="0.3" | ||
android:fillColor="@android:color/white" | ||
android:pathData="M12,4c-4.41,0 -8,3.59 -8,8s3.59,8 8,8 8,-3.59 8,-8 -3.59,-8 -8,-8zM17,13L7,13v-2h10v2z" android:strokeAlpha="0.3"/> | ||
<path android:fillColor="@android:color/white" android:pathData="M7,11h10v2L7,13zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/> | ||
</vector> |
Oops, something went wrong.