Merge branch 'develop' into PR-master-auto-online
This commit is contained in:
commit
77ddbc39a5
@ -26,7 +26,7 @@ public class ApiClient {
|
|||||||
private static Retrofit retrofit = null;
|
private static Retrofit retrofit = null;
|
||||||
private static int REQUEST_TIMEOUT = 60;
|
private static int REQUEST_TIMEOUT = 60;
|
||||||
private static OkHttpClient okHttpClient;
|
private static OkHttpClient okHttpClient;
|
||||||
private static final String BASE_URL = "https://s416084.projektstudencki.pl/master/";
|
private static final String BASE_URL = "https://s416084.projektstudencki.pl/develop/";
|
||||||
|
|
||||||
public static Retrofit getClient(Context context) {
|
public static Retrofit getClient(Context context) {
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import retrofit2.http.POST;
|
|||||||
|
|
||||||
public interface FeedbackService {
|
public interface FeedbackService {
|
||||||
@POST("api/Feedback")
|
@POST("api/Feedback")
|
||||||
Observable<Void> postFeedback(@Body Feedback feedback);
|
Observable<Response<Void>> postFeedback(@Body Feedback feedback);
|
||||||
|
|
||||||
@GET("api/Feedback")
|
@GET("api/Feedback")
|
||||||
Observable<Void> getFeedback();
|
Observable<Void> getFeedback();
|
||||||
|
@ -82,10 +82,9 @@ public class FeedbackUtils {
|
|||||||
try {
|
try {
|
||||||
appVersion = activityContext.getPackageManager().getPackageInfo(activityContext.getPackageName(), 0).versionName;
|
appVersion = activityContext.getPackageManager().getPackageInfo(activityContext.getPackageName(), 0).versionName;
|
||||||
if( !mode ){
|
if( !mode ){
|
||||||
body = PrefUtils.getUserFirstName(activityContext) + " " + PrefUtils.getUserLastName(activityContext) + "\n" + body;
|
|
||||||
userFeedback = new Feedback(mode,
|
userFeedback = new Feedback(mode,
|
||||||
header,
|
header,
|
||||||
PrefUtils.getUserId(activityContext),
|
PrefUtils.getUserFirstName(activityContext) + " " + PrefUtils.getUserLastName(activityContext) + " | " + PrefUtils.getUserId(activityContext),
|
||||||
"Android "+ Build.VERSION.RELEASE,
|
"Android "+ Build.VERSION.RELEASE,
|
||||||
appVersion,
|
appVersion,
|
||||||
Build.MODEL,
|
Build.MODEL,
|
||||||
@ -113,8 +112,10 @@ public class FeedbackUtils {
|
|||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(this::handleResponse, this::handleError));
|
.subscribe(this::handleResponse, this::handleError));
|
||||||
}
|
}
|
||||||
private void handleResponse( Void resp) {
|
private void handleResponse( Response<Void> resp) {
|
||||||
Toast.makeText(activityContext, activityContext.getString(R.string.modal_feedback_thankyou), Toast.LENGTH_SHORT).show();
|
Toast.makeText(activityContext, activityContext.getString(R.string.modal_feedback_thankyou), Toast.LENGTH_SHORT).show();
|
||||||
|
Log.d("FEEDBACK toast","gdzie jest mój tost");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleError(Throwable error) {
|
private void handleError(Throwable error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user