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 int REQUEST_TIMEOUT = 60;
|
||||
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) {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import retrofit2.http.POST;
|
||||
|
||||
public interface FeedbackService {
|
||||
@POST("api/Feedback")
|
||||
Observable<Void> postFeedback(@Body Feedback feedback);
|
||||
Observable<Response<Void>> postFeedback(@Body Feedback feedback);
|
||||
|
||||
@GET("api/Feedback")
|
||||
Observable<Void> getFeedback();
|
||||
|
@ -82,10 +82,9 @@ public class FeedbackUtils {
|
||||
try {
|
||||
appVersion = activityContext.getPackageManager().getPackageInfo(activityContext.getPackageName(), 0).versionName;
|
||||
if( !mode ){
|
||||
body = PrefUtils.getUserFirstName(activityContext) + " " + PrefUtils.getUserLastName(activityContext) + "\n" + body;
|
||||
userFeedback = new Feedback(mode,
|
||||
header,
|
||||
PrefUtils.getUserId(activityContext),
|
||||
PrefUtils.getUserFirstName(activityContext) + " " + PrefUtils.getUserLastName(activityContext) + " | " + PrefUtils.getUserId(activityContext),
|
||||
"Android "+ Build.VERSION.RELEASE,
|
||||
appVersion,
|
||||
Build.MODEL,
|
||||
@ -113,8 +112,10 @@ public class FeedbackUtils {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.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();
|
||||
Log.d("FEEDBACK toast","gdzie jest mój tost");
|
||||
|
||||
}
|
||||
|
||||
private void handleError(Throwable error) {
|
||||
|
Loading…
Reference in New Issue
Block a user