mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-23 14:17:15 +00:00
Display snackbar on drop
This commit is contained in:
parent
a61f53caf5
commit
243cfcc4dc
4 changed files with 44 additions and 0 deletions
|
|
@ -546,6 +546,11 @@ public class MainActivity extends AvatarActivityBase implements HabitRPGUserCall
|
|||
@Override
|
||||
public void onTaskDataReceived(TaskDirectionData data) {
|
||||
notifyUser(data.getExp(), data.getHp(), data.getGp(), data.getLvl(), data.getDelta());
|
||||
if (data.get_tmp() != null) {
|
||||
if (data.get_tmp().getDrop() != null) {
|
||||
showSnackbar(data.get_tmp().getDrop().getDialog());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ package com.magicmicky.habitrpgwrapper.lib.models;
|
|||
*/
|
||||
public class TaskDirectionData extends PlayerMinStats{
|
||||
private float delta;
|
||||
private TaskDirectionDataTemp _tmp;
|
||||
|
||||
public float getDelta() {
|
||||
return delta;
|
||||
|
|
@ -17,4 +18,6 @@ public class TaskDirectionData extends PlayerMinStats{
|
|||
this.delta = delta;
|
||||
}
|
||||
|
||||
public TaskDirectionDataTemp get_tmp() { return _tmp; }
|
||||
public void set_tmp(TaskDirectionDataTemp tmp) { this._tmp = tmp; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.magicmicky.habitrpgwrapper.lib.models;
|
||||
|
||||
/**
|
||||
* Created by viirus on 14/11/15.
|
||||
*/
|
||||
public class TaskDirectionDataDrop {
|
||||
|
||||
private int value;
|
||||
private String key;
|
||||
private String type;
|
||||
private String dialog;
|
||||
|
||||
public int getValue() {return value; }
|
||||
public String getKey() {return key; }
|
||||
public String getType() {return type; }
|
||||
public String getDialog() {return dialog; }
|
||||
|
||||
public void setValue(int value) {this.value = value; }
|
||||
public void setKey(String key) {this.key = key; }
|
||||
public void setType(String type) {this.type = type; }
|
||||
public void setDialog(String dialog) {this.dialog = dialog; }
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.magicmicky.habitrpgwrapper.lib.models;
|
||||
|
||||
/**
|
||||
* Created by viirus on 14/11/15.
|
||||
*/
|
||||
public class TaskDirectionDataTemp {
|
||||
|
||||
private TaskDirectionDataDrop drop;
|
||||
|
||||
public TaskDirectionDataDrop getDrop() { return this.drop; }
|
||||
public void setDrop(TaskDirectionDataDrop drop) { this.drop = drop; }
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue