-
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.
hotfix: app doesn't start due to obfuscation of shared preferences an…
…d User class Kotlin implementation
- Loading branch information
1 parent
fa45bfe
commit c812280
Showing
3 changed files
with
50 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package by.d1makrat.library_fm.model; | ||
|
||
import java.util.Calendar; | ||
import java.util.Locale; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
public class User { | ||
|
||
private String username; | ||
|
||
private String playcount; | ||
|
||
private String registered; | ||
|
||
private String url; | ||
|
||
private String avatarUri; | ||
|
||
public User(String pUsername, String pPlaycount, String pRegistered, String pUrl, String pAvatarUrl) { | ||
username = pUsername; | ||
playcount = pPlaycount; | ||
registered = pRegistered; | ||
url = pUrl; | ||
avatarUri = pAvatarUrl; | ||
} | ||
|
||
public String getUsername() { | ||
return username; | ||
} | ||
|
||
public String getPlaycount() { | ||
return playcount; | ||
} | ||
|
||
public String getRegistered() { | ||
Calendar calendar = Calendar.getInstance(); | ||
calendar.setTimeInMillis(TimeUnit.SECONDS.toMillis(Long.valueOf(registered))); | ||
return calendar.get(Calendar.DAY_OF_MONTH) + " " + calendar.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.ENGLISH) + " " + calendar.get(Calendar.YEAR); | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public String getAvatarUrl() { | ||
return avatarUri; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.