-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from LiveTex/new_rating_system
New rating system
- Loading branch information
Showing
11 changed files
with
108 additions
and
21 deletions.
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
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,15 @@ | ||
package ru.livetex.sdk.entity; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
public class DialogRating { | ||
|
||
// null when it's not allowed to rate | ||
@Nullable | ||
public DialogRatingType enabledType; | ||
|
||
// null if dialog isn't rated yet | ||
@Nullable | ||
public DialogRatingData isSet; | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
sdk/src/main/java/ru/livetex/sdk/entity/DialogRatingData.java
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,18 @@ | ||
package ru.livetex.sdk.entity; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
public class DialogRatingData { | ||
@NonNull | ||
public DialogRatingType type; | ||
|
||
@NonNull | ||
// fivePoint: "1" | "2" | "3" | "4" | "5". | ||
// doublePoint: "0" | "1" | ||
public String value; | ||
|
||
public DialogRatingData(@NonNull DialogRatingType type, @NonNull String value) { | ||
this.type = type; | ||
this.value = value; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
sdk/src/main/java/ru/livetex/sdk/entity/DialogRatingType.java
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,12 @@ | ||
package ru.livetex.sdk.entity; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public enum DialogRatingType { | ||
// old "good-bad" rating system | ||
@SerializedName("doublePoint") | ||
DOUBLE_POINT, | ||
// new "five stars" rating system | ||
@SerializedName("fivePoint") | ||
FIVE_POINT, | ||
} |
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