qfixes with indicators
This commit is contained in:
parent
6d73598d5e
commit
e6faea8aee
@ -29,7 +29,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@ -10,7 +10,7 @@ android {
|
|||||||
applicationId "com.uam.wmi.findmytutor"
|
applicationId "com.uam.wmi.findmytutor"
|
||||||
minSdkVersion 22
|
minSdkVersion 22
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode 53
|
versionCode 54
|
||||||
versionName "1.0.0"
|
versionName "1.0.0"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -82,6 +82,7 @@ public class UsersListFragment extends Fragment {
|
|||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
private TutorsListAdapter mAdapter;
|
private TutorsListAdapter mAdapter;
|
||||||
private List<User> tutorsList = new ArrayList<>();
|
private List<User> tutorsList = new ArrayList<>();
|
||||||
|
private List<User> tutorsNewCordsList = new ArrayList<>();
|
||||||
private HashMap<String, String> tutorsTimeStamps = new HashMap<>();
|
private HashMap<String, String> tutorsTimeStamps = new HashMap<>();
|
||||||
|
|
||||||
private Collator plCollator = Collator.getInstance(Locale.forLanguageTag("pl-PL"));
|
private Collator plCollator = Collator.getInstance(Locale.forLanguageTag("pl-PL"));
|
||||||
@ -457,6 +458,8 @@ public class UsersListFragment extends Fragment {
|
|||||||
tutorsTimeStamps.put(crd.getUserId(), getDate(ts));
|
tutorsTimeStamps.put(crd.getUserId(), getDate(ts));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mAdapter.notifyDataSetChanged();
|
mAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.uam.wmi.findmytutor.R;
|
import com.uam.wmi.findmytutor.R;
|
||||||
import com.uam.wmi.findmytutor.model.User;
|
import com.uam.wmi.findmytutor.model.User;
|
||||||
@ -49,17 +50,23 @@ public class TutorsListAdapter extends RecyclerView.Adapter<TutorsListAdapter.My
|
|||||||
if (tutor.isIsOnline()) {
|
if (tutor.isIsOnline()) {
|
||||||
image = context.getResources().getDrawable(R.drawable.user_list_online);
|
image = context.getResources().getDrawable(R.drawable.user_list_online);
|
||||||
holder.lastSeen.setText(R.string.available_now);
|
holder.lastSeen.setText(R.string.available_now);
|
||||||
|
holder.lastSeen.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
image = context.getResources().getDrawable(R.drawable.user_list_offline);
|
image = context.getResources().getDrawable(R.drawable.user_list_offline);
|
||||||
String ts = tutorsTimeStamps.get(tutor.getId());
|
String ts = tutorsTimeStamps.get(tutor.getId());
|
||||||
|
|
||||||
if (ts != null){
|
if (ts != null){
|
||||||
|
Toast.makeText(context,"eeeeeee",Toast.LENGTH_SHORT);
|
||||||
holder.lastSeen.setText(String.format("%s: %s", context.getResources().getString(R.string.last_seen), ts));
|
holder.lastSeen.setText(String.format("%s: %s", context.getResources().getString(R.string.last_seen), ts));
|
||||||
|
} else {
|
||||||
|
holder.lastSeen.setText(String.format("%s: %s", context.getResources().getString(R.string.last_seen), "unknwon"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tutor.isIsActive()) {
|
if (!tutor.isIsActive()) {
|
||||||
image = context.getResources().getDrawable(R.drawable.user_list_off);
|
image = context.getResources().getDrawable(R.drawable.user_list_off);
|
||||||
|
holder.lastSeen.setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
image.setBounds(0, 0, image.getIntrinsicWidth(), image.getIntrinsicHeight());
|
image.setBounds(0, 0, image.getIntrinsicWidth(), image.getIntrinsicHeight());
|
||||||
|
Loading…
Reference in New Issue
Block a user