Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
087fc7fc
Commit
087fc7fc
authored
Feb 06, 2019
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor complaints to not pass around sessionid
parent
8981a4fa
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
81 deletions
+43
-81
app/src/main/java/app/insti/adapter/CommentsAdapter.java
app/src/main/java/app/insti/adapter/CommentsAdapter.java
+4
-17
app/src/main/java/app/insti/adapter/ComplaintDetailsPagerAdapter.java
.../java/app/insti/adapter/ComplaintDetailsPagerAdapter.java
+4
-5
app/src/main/java/app/insti/adapter/ComplaintFragmentViewPagerAdapter.java
.../app/insti/adapter/ComplaintFragmentViewPagerAdapter.java
+3
-3
app/src/main/java/app/insti/adapter/ComplaintsAdapter.java
app/src/main/java/app/insti/adapter/ComplaintsAdapter.java
+6
-13
app/src/main/java/app/insti/fragment/ComplaintDetailsFragment.java
...ain/java/app/insti/fragment/ComplaintDetailsFragment.java
+8
-9
app/src/main/java/app/insti/fragment/ComplaintFragment.java
app/src/main/java/app/insti/fragment/ComplaintFragment.java
+10
-19
app/src/main/java/app/insti/fragment/ComplaintsHomeFragment.java
.../main/java/app/insti/fragment/ComplaintsHomeFragment.java
+4
-10
app/src/main/java/app/insti/fragment/ComplaintsMeFragment.java
...rc/main/java/app/insti/fragment/ComplaintsMeFragment.java
+4
-5
No files found.
app/src/main/java/app/insti/adapter/CommentsAdapter.java
View file @
087fc7fc
...
@@ -7,7 +7,6 @@ import android.support.annotation.NonNull;
...
@@ -7,7 +7,6 @@ import android.support.annotation.NonNull;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.CardView
;
import
android.support.v7.widget.CardView
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.view.View
;
...
@@ -23,12 +22,12 @@ import java.util.List;
...
@@ -23,12 +22,12 @@ import java.util.List;
import
app.insti.R
;
import
app.insti.R
;
import
app.insti.Utils
;
import
app.insti.Utils
;
import
app.insti.api.EmptyCallback
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.model.Venter
;
import
app.insti.api.model.Venter
;
import
app.insti.utils.DateTimeUtil
;
import
app.insti.utils.DateTimeUtil
;
import
de.hdodenhof.circleimageview.CircleImageView
;
import
de.hdodenhof.circleimageview.CircleImageView
;
import
retrofit2.Call
;
import
retrofit2.Call
;
import
retrofit2.Callback
;
import
retrofit2.Response
;
import
retrofit2.Response
;
/**
/**
...
@@ -41,15 +40,14 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
...
@@ -41,15 +40,14 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
private
Context
context
;
private
Context
context
;
private
LayoutInflater
inflater
;
private
LayoutInflater
inflater
;
private
String
sessionId
,
userId
;
private
String
userId
;
private
Fragment
fragment
;
private
Fragment
fragment
;
private
TextView
textViewCommentLabel
;
private
TextView
textViewCommentLabel
;
private
List
<
Venter
.
Comment
>
commentList
=
new
ArrayList
<>();
private
List
<
Venter
.
Comment
>
commentList
=
new
ArrayList
<>();
public
CommentsAdapter
(
Context
context
,
String
sessionId
,
String
userId
,
Fragment
fragment
)
{
public
CommentsAdapter
(
Context
context
,
String
userId
,
Fragment
fragment
)
{
this
.
context
=
context
;
this
.
context
=
context
;
this
.
sessionId
=
sessionId
;
this
.
userId
=
userId
;
this
.
userId
=
userId
;
inflater
=
LayoutInflater
.
from
(
context
);
inflater
=
LayoutInflater
.
from
(
context
);
this
.
fragment
=
fragment
;
this
.
fragment
=
fragment
;
...
@@ -78,15 +76,9 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
...
@@ -78,15 +76,9 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
final
Venter
.
Comment
comment
=
commentList
.
get
(
position
);
final
Venter
.
Comment
comment
=
commentList
.
get
(
position
);
try
{
try
{
String
profileUrl
=
comment
.
getUser
().
getUserProfilePictureUrl
();
String
profileUrl
=
comment
.
getUser
().
getUserProfilePictureUrl
();
Log
.
i
(
TAG
,
"PROFILE URL: "
+
profileUrl
);
Picasso
.
get
().
load
(
profileUrl
).
placeholder
(
R
.
drawable
.
user_placeholder
).
into
(
circleImageView
);
Picasso
.
get
().
load
(
profileUrl
).
placeholder
(
R
.
drawable
.
user_placeholder
).
into
(
circleImageView
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
textViewName
.
setText
(
comment
.
getUser
().
getUserName
());
textViewName
.
setText
(
comment
.
getUser
().
getUserName
());
String
time
=
DateTimeUtil
.
getDate
(
comment
.
getTime
());
String
time
=
DateTimeUtil
.
getDate
(
comment
.
getTime
());
Log
.
i
(
TAG
,
"time: "
+
time
);
textViewCommentTime
.
setText
(
time
);
textViewCommentTime
.
setText
(
time
);
textViewComment
.
setText
(
comment
.
getText
());
textViewComment
.
setText
(
comment
.
getText
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -115,7 +107,7 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
...
@@ -115,7 +107,7 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
Toast
.
makeText
(
context
,
"Comment Copied"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
context
,
"Comment Copied"
,
Toast
.
LENGTH_SHORT
).
show
();
break
;
break
;
case
R
.
id
.
delete_comment_option
:
case
R
.
id
.
delete_comment_option
:
retrofitInterface
.
deleteComment
(
"sessionid="
+
sessionId
,
comment
.
getId
()).
enqueue
(
new
Callback
<
String
>()
{
retrofitInterface
.
deleteComment
(
Utils
.
getSessionIDHeader
(),
comment
.
getId
()).
enqueue
(
new
Empty
Callback
<
String
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
String
>
call
,
Response
<
String
>
response
)
{
public
void
onResponse
(
Call
<
String
>
call
,
Response
<
String
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -128,11 +120,6 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
...
@@ -128,11 +120,6 @@ public class CommentsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
Toast
.
makeText
(
context
,
"You can't delete this comment"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
context
,
"You can't delete this comment"
,
Toast
.
LENGTH_SHORT
).
show
();
}
}
}
}
@Override
public
void
onFailure
(
Call
<
String
>
call
,
Throwable
t
)
{
Log
.
i
(
TAG
,
" failure in deleting: "
+
t
.
toString
());
}
});
});
break
;
break
;
...
...
app/src/main/java/app/insti/adapter/ComplaintDetailsPagerAdapter.java
View file @
087fc7fc
...
@@ -12,11 +12,10 @@ import app.insti.fragment.ComplaintDetailsFragment;
...
@@ -12,11 +12,10 @@ import app.insti.fragment.ComplaintDetailsFragment;
public
class
ComplaintDetailsPagerAdapter
extends
FragmentPagerAdapter
{
public
class
ComplaintDetailsPagerAdapter
extends
FragmentPagerAdapter
{
private
String
sessionid
,
complaintid
,
userid
,
userProfileUrl
;
private
String
complaintid
,
userid
,
userProfileUrl
;
public
ComplaintDetailsPagerAdapter
(
FragmentManager
fm
,
String
sessionid
,
String
complaintid
,
String
userid
,
String
userProfileUrl
)
{
public
ComplaintDetailsPagerAdapter
(
FragmentManager
fm
,
String
complaintid
,
String
userid
,
String
userProfileUrl
)
{
super
(
fm
);
super
(
fm
);
this
.
sessionid
=
sessionid
;
this
.
complaintid
=
complaintid
;
this
.
complaintid
=
complaintid
;
this
.
userid
=
userid
;
this
.
userid
=
userid
;
this
.
userProfileUrl
=
userProfileUrl
;
this
.
userProfileUrl
=
userProfileUrl
;
...
@@ -26,14 +25,14 @@ public class ComplaintDetailsPagerAdapter extends FragmentPagerAdapter {
...
@@ -26,14 +25,14 @@ public class ComplaintDetailsPagerAdapter extends FragmentPagerAdapter {
public
Fragment
getItem
(
int
position
)
{
public
Fragment
getItem
(
int
position
)
{
switch
(
position
)
{
switch
(
position
)
{
case
0
:
case
0
:
return
ComplaintDetailsFragment
.
getInstance
(
sessionid
,
complaintid
,
userid
,
userProfileUrl
);
return
ComplaintDetailsFragment
.
getInstance
(
complaintid
,
userid
,
userProfileUrl
);
/*
/*
For version 2:
For version 2:
case 1:
case 1:
return RelevantComplaintsFragment.getInstance(sessionid, userid);
return RelevantComplaintsFragment.getInstance(sessionid, userid);
*/
*/
default
:
default
:
return
ComplaintDetailsFragment
.
getInstance
(
sessionid
,
complaintid
,
userid
,
userProfileUrl
);
return
ComplaintDetailsFragment
.
getInstance
(
complaintid
,
userid
,
userProfileUrl
);
}
}
}
}
...
...
app/src/main/java/app/insti/adapter/ComplaintFragmentViewPagerAdapter.java
View file @
087fc7fc
...
@@ -27,11 +27,11 @@ public class ComplaintFragmentViewPagerAdapter extends FragmentStatePagerAdapter
...
@@ -27,11 +27,11 @@ public class ComplaintFragmentViewPagerAdapter extends FragmentStatePagerAdapter
public
Fragment
getItem
(
int
position
)
{
public
Fragment
getItem
(
int
position
)
{
switch
(
position
)
{
switch
(
position
)
{
case
0
:
case
0
:
return
ComplaintsHomeFragment
.
getInstance
(
sessionID
,
userID
,
userProfileUrl
);
return
ComplaintsHomeFragment
.
getInstance
(
userID
,
userProfileUrl
);
case
1
:
case
1
:
return
ComplaintsMeFragment
.
getInstance
(
sessionID
,
userID
,
userProfileUrl
);
return
ComplaintsMeFragment
.
getInstance
(
userID
,
userProfileUrl
);
default
:
default
:
return
ComplaintsHomeFragment
.
getInstance
(
sessionID
,
userID
,
userProfileUrl
);
return
ComplaintsHomeFragment
.
getInstance
(
userID
,
userProfileUrl
);
}
}
}
}
...
...
app/src/main/java/app/insti/adapter/ComplaintsAdapter.java
View file @
087fc7fc
...
@@ -23,6 +23,7 @@ import java.util.List;
...
@@ -23,6 +23,7 @@ import java.util.List;
import
app.insti.R
;
import
app.insti.R
;
import
app.insti.Utils
;
import
app.insti.Utils
;
import
app.insti.api.EmptyCallback
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.model.User
;
import
app.insti.api.model.User
;
import
app.insti.api.model.Venter
;
import
app.insti.api.model.Venter
;
...
@@ -40,7 +41,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
...
@@ -40,7 +41,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
private
LayoutInflater
inflater
;
private
LayoutInflater
inflater
;
private
Activity
context
;
private
Activity
context
;
private
String
sessionID
;
private
String
userID
;
private
String
userID
;
private
String
userProfileUrl
;
private
String
userProfileUrl
;
private
static
final
String
TAG
=
ComplaintsAdapter
.
class
.
getSimpleName
();
private
static
final
String
TAG
=
ComplaintsAdapter
.
class
.
getSimpleName
();
...
@@ -111,7 +111,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
...
@@ -111,7 +111,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
if
(
complaintList
.
get
(
position
).
getVoteCount
()
==
0
)
{
if
(
complaintList
.
get
(
position
).
getVoteCount
()
==
0
)
{
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
retrofitInterface
.
upVote
(
"sessionid="
+
sessionID
,
complaintList
.
get
(
pos
).
getComplaintID
(),
1
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
upVote
(
Utils
.
getSessionIDHeader
()
,
complaintList
.
get
(
pos
).
getComplaintID
(),
1
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -130,7 +130,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
...
@@ -130,7 +130,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
});
});
}
else
if
(
complaintList
.
get
(
position
).
getVoteCount
()
==
1
)
{
}
else
if
(
complaintList
.
get
(
position
).
getVoteCount
()
==
1
)
{
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
retrofitInterface
.
upVote
(
"sessionid="
+
sessionID
,
complaintList
.
get
(
pos
).
getComplaintID
(),
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
upVote
(
Utils
.
getSessionIDHeader
()
,
complaintList
.
get
(
pos
).
getComplaintID
(),
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -212,7 +212,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
...
@@ -212,7 +212,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
private
void
getComplaint
(
Venter
.
Complaint
detailedComplaint
)
{
private
void
getComplaint
(
Venter
.
Complaint
detailedComplaint
)
{
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"id"
,
detailedComplaint
.
getComplaintID
());
bundle
.
putString
(
"id"
,
detailedComplaint
.
getComplaintID
());
bundle
.
putString
(
"sessionId"
,
sessionID
);
bundle
.
putString
(
"userId"
,
userID
);
bundle
.
putString
(
"userId"
,
userID
);
bundle
.
putString
(
"userProfileUrl"
,
userProfileUrl
);
bundle
.
putString
(
"userProfileUrl"
,
userProfileUrl
);
ComplaintFragment
complaintFragment
=
new
ComplaintFragment
();
ComplaintFragment
complaintFragment
=
new
ComplaintFragment
();
...
@@ -232,7 +231,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
...
@@ -232,7 +231,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
"Yes"
,
"Yes"
,
new
DialogInterface
.
OnClickListener
()
{
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
retrofitInterface
.
subscribetoComplaint
(
"sessionid="
+
sessionID
,
detailedComplaint
.
getComplaintID
(),
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
subscribetoComplaint
(
Utils
.
getSessionIDHeader
()
,
detailedComplaint
.
getComplaintID
(),
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -263,7 +262,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
...
@@ -263,7 +262,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
AlertDialog
alert11
=
unsubscribe
.
create
();
AlertDialog
alert11
=
unsubscribe
.
create
();
alert11
.
show
();
alert11
.
show
();
}
else
if
(
detailedComplaint
.
getComplaintsubscribed
()
==
0
){
}
else
if
(
detailedComplaint
.
getComplaintsubscribed
()
==
0
){
retrofitInterface
.
subscribetoComplaint
(
"sessionid="
+
sessionID
,
detailedComplaint
.
getComplaintID
(),
1
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
subscribetoComplaint
(
Utils
.
getSessionIDHeader
(),
detailedComplaint
.
getComplaintID
(),
1
).
enqueue
(
new
Empty
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -274,18 +273,12 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
...
@@ -274,18 +273,12 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
LENGTH_SHORT
).
show
();
}
}
}
}
@Override
public
void
onFailure
(
Call
<
Venter
.
Complaint
>
call
,
Throwable
t
)
{
Log
.
i
(
TAG
,
"failure in subscribe: "
+
t
.
toString
());
}
});
});
}
}
}
}
public
ComplaintsAdapter
(
Activity
ctx
,
String
sessionID
,
String
userID
,
String
userProfileUrl
)
{
public
ComplaintsAdapter
(
Activity
ctx
,
String
userID
,
String
userProfileUrl
)
{
this
.
context
=
ctx
;
this
.
context
=
ctx
;
this
.
sessionID
=
sessionID
;
this
.
userID
=
userID
;
this
.
userID
=
userID
;
this
.
userProfileUrl
=
userProfileUrl
;
this
.
userProfileUrl
=
userProfileUrl
;
inflater
=
LayoutInflater
.
from
(
ctx
);
inflater
=
LayoutInflater
.
from
(
ctx
);
...
...
app/src/main/java/app/insti/fragment/ComplaintDetailsFragment.java
View file @
087fc7fc
...
@@ -80,7 +80,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -80,7 +80,7 @@ public class ComplaintDetailsFragment extends Fragment {
private
CircleImageView
circleImageViewCreatorImage
;
private
CircleImageView
circleImageViewCreatorImage
;
private
View
mView
;
private
View
mView
;
private
static
String
sId
,
cId
,
uId
,
uProfileUrl
;
private
static
String
cId
,
uId
,
uProfileUrl
;
private
CommentsAdapter
commentListAdapter
;
private
CommentsAdapter
commentListAdapter
;
private
UpVotesAdapter
upVotesAdapter
;
private
UpVotesAdapter
upVotesAdapter
;
private
List
<
Venter
.
Comment
>
commentList
;
private
List
<
Venter
.
Comment
>
commentList
;
...
@@ -90,8 +90,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -90,8 +90,7 @@ public class ComplaintDetailsFragment extends Fragment {
private
NestedScrollView
nestedScrollView
;
private
NestedScrollView
nestedScrollView
;
private
CircleIndicator
circleIndicator
;
private
CircleIndicator
circleIndicator
;
public
static
ComplaintDetailsFragment
getInstance
(
String
sessionid
,
String
complaintid
,
String
userid
,
String
userProfileUrl
)
{
public
static
ComplaintDetailsFragment
getInstance
(
String
complaintid
,
String
userid
,
String
userProfileUrl
)
{
sId
=
sessionid
;
cId
=
complaintid
;
cId
=
complaintid
;
uId
=
userid
;
uId
=
userid
;
uProfileUrl
=
userProfileUrl
;
uProfileUrl
=
userProfileUrl
;
...
@@ -107,7 +106,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -107,7 +106,7 @@ public class ComplaintDetailsFragment extends Fragment {
initialiseViews
(
view
);
initialiseViews
(
view
);
upVotesList
=
new
ArrayList
<>();
upVotesList
=
new
ArrayList
<>();
commentListAdapter
=
new
CommentsAdapter
(
getContext
(),
sId
,
uId
,
this
);
commentListAdapter
=
new
CommentsAdapter
(
getContext
(),
uId
,
this
);
LinearLayoutManager
linearLayoutManager
=
new
LinearLayoutManager
(
getContext
());
LinearLayoutManager
linearLayoutManager
=
new
LinearLayoutManager
(
getContext
());
upVotesAdapter
=
new
UpVotesAdapter
(
this
,
getContext
());
upVotesAdapter
=
new
UpVotesAdapter
(
this
,
getContext
());
recyclerViewComments
.
setLayoutManager
(
linearLayoutManager
);
recyclerViewComments
.
setLayoutManager
(
linearLayoutManager
);
...
@@ -273,7 +272,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -273,7 +272,7 @@ public class ComplaintDetailsFragment extends Fragment {
private
void
postComment
()
{
private
void
postComment
()
{
final
CommentCreateRequest
commentCreateRequest
=
new
CommentCreateRequest
(
editTextComment
.
getText
().
toString
());
final
CommentCreateRequest
commentCreateRequest
=
new
CommentCreateRequest
(
editTextComment
.
getText
().
toString
());
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
retrofitInterface
.
postComment
(
"sessionid="
+
sId
,
cId
,
commentCreateRequest
).
enqueue
(
new
Callback
<
Venter
.
Comment
>()
{
retrofitInterface
.
postComment
(
Utils
.
getSessionIDHeader
()
,
cId
,
commentCreateRequest
).
enqueue
(
new
Callback
<
Venter
.
Comment
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Comment
>
call
,
Response
<
Venter
.
Comment
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Comment
>
call
,
Response
<
Venter
.
Comment
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -314,7 +313,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -314,7 +313,7 @@ public class ComplaintDetailsFragment extends Fragment {
private
void
upVote
(
final
Venter
.
Complaint
detailedComplaint
)
{
private
void
upVote
(
final
Venter
.
Complaint
detailedComplaint
)
{
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
if
(
detailedComplaint
.
getVoteCount
()
==
0
)
{
if
(
detailedComplaint
.
getVoteCount
()
==
0
)
{
retrofitInterface
.
upVote
(
"sessionid="
+
sId
,
cId
,
1
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
upVote
(
Utils
.
getSessionIDHeader
()
,
cId
,
1
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -331,7 +330,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -331,7 +330,7 @@ public class ComplaintDetailsFragment extends Fragment {
}
}
});
});
}
else
if
(
detailedComplaint
.
getVoteCount
()
==
1
){
}
else
if
(
detailedComplaint
.
getVoteCount
()
==
1
){
retrofitInterface
.
upVote
(
"sessionid="
+
sId
,
cId
,
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
upVote
(
Utils
.
getSessionIDHeader
()
,
cId
,
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -360,7 +359,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -360,7 +359,7 @@ public class ComplaintDetailsFragment extends Fragment {
"Yes"
,
"Yes"
,
new
DialogInterface
.
OnClickListener
()
{
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
retrofitInterface
.
subscribetoComplaint
(
"sessionid="
+
sId
,
detailedComplaint
.
getComplaintID
(),
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
subscribetoComplaint
(
Utils
.
getSessionIDHeader
()
,
detailedComplaint
.
getComplaintID
(),
0
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
@@ -389,7 +388,7 @@ public class ComplaintDetailsFragment extends Fragment {
...
@@ -389,7 +388,7 @@ public class ComplaintDetailsFragment extends Fragment {
AlertDialog
alert11
=
unsubscribe
.
create
();
AlertDialog
alert11
=
unsubscribe
.
create
();
alert11
.
show
();
alert11
.
show
();
}
else
if
(
detailedComplaint
.
getComplaintsubscribed
()
==
0
){
}
else
if
(
detailedComplaint
.
getComplaintsubscribed
()
==
0
){
retrofitInterface
.
subscribetoComplaint
(
"sessionid="
+
sId
,
detailedComplaint
.
getComplaintID
(),
1
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
subscribetoComplaint
(
Utils
.
getSessionIDHeader
()
,
detailedComplaint
.
getComplaintID
(),
1
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
...
app/src/main/java/app/insti/fragment/ComplaintFragment.java
View file @
087fc7fc
...
@@ -19,6 +19,7 @@ import java.util.Objects;
...
@@ -19,6 +19,7 @@ import java.util.Objects;
import
app.insti.R
;
import
app.insti.R
;
import
app.insti.Utils
;
import
app.insti.Utils
;
import
app.insti.adapter.ComplaintDetailsPagerAdapter
;
import
app.insti.adapter.ComplaintDetailsPagerAdapter
;
import
app.insti.api.EmptyCallback
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.model.User
;
import
app.insti.api.model.User
;
import
app.insti.api.model.Venter
;
import
app.insti.api.model.Venter
;
...
@@ -32,7 +33,7 @@ public class ComplaintFragment extends Fragment {
...
@@ -32,7 +33,7 @@ public class ComplaintFragment extends Fragment {
private
TabLayout
slidingTabLayout
;
private
TabLayout
slidingTabLayout
;
private
ViewPager
viewPager
;
private
ViewPager
viewPager
;
private
View
mview
;
private
View
mview
;
private
String
complaintId
,
sessionID
,
userId
,
userProfileUrl
;
private
String
complaintId
,
userId
,
userProfileUrl
;
@Override
@Override
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
...
@@ -51,7 +52,6 @@ public class ComplaintFragment extends Fragment {
...
@@ -51,7 +52,6 @@ public class ComplaintFragment extends Fragment {
Bundle
bundle
=
getArguments
();
Bundle
bundle
=
getArguments
();
if
(
bundle
!=
null
)
{
if
(
bundle
!=
null
)
{
complaintId
=
bundle
.
getString
(
"id"
);
complaintId
=
bundle
.
getString
(
"id"
);
sessionID
=
bundle
.
getString
(
"sessionId"
);
userId
=
bundle
.
getString
(
"userId"
);
userId
=
bundle
.
getString
(
"userId"
);
userProfileUrl
=
bundle
.
getString
(
"userProfileUrl"
);
userProfileUrl
=
bundle
.
getString
(
"userProfileUrl"
);
callServerToGetDetailedComplaint
();
callServerToGetDetailedComplaint
();
...
@@ -61,18 +61,17 @@ public class ComplaintFragment extends Fragment {
...
@@ -61,18 +61,17 @@ public class ComplaintFragment extends Fragment {
private
void
callServerToGetDetailedComplaint
()
{
private
void
callServerToGetDetailedComplaint
()
{
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
retrofitInterface
.
getComplaint
(
"sessionid="
+
sessionID
,
complaintId
).
enqueue
(
new
Callback
<
Venter
.
Complaint
>()
{
retrofitInterface
.
getComplaint
(
Utils
.
getSessionIDHeader
(),
complaintId
).
enqueue
(
new
Empty
Callback
<
Venter
.
Complaint
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
public
void
onResponse
(
Call
<
Venter
.
Complaint
>
call
,
Response
<
Venter
.
Complaint
>
response
)
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
if
(
response
.
body
()
!=
null
)
{
if
(
response
.
body
()
!=
null
)
{
Venter
.
Complaint
complaint
=
response
.
body
();
Venter
.
Complaint
complaint
=
response
.
body
();
if
(
complaint
!=
null
)
{
for
(
User
currentUser
:
complaint
.
getUsersUpVoted
())
{
for
(
User
currentUser
:
complaint
.
getUsersUpVoted
())
{
if
(
currentUser
.
getUserID
().
equals
(
userId
))
{
if
(
currentUser
.
getUserID
().
equals
(
userId
))
{
complaint
.
setVoteCount
(
1
);
complaint
.
setVoteCount
(
1
);
}
else
{
}
else
{
complaint
.
setVoteCount
(
0
);
complaint
.
setVoteCount
(
0
);
}
}
}
}
}
initTabViews
(
complaint
);
initTabViews
(
complaint
);
...
@@ -80,13 +79,6 @@ public class ComplaintFragment extends Fragment {
...
@@ -80,13 +79,6 @@ public class ComplaintFragment extends Fragment {
getActivity
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
GONE
);
getActivity
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
GONE
);
}
}
}
}
@Override
public
void
onFailure
(
Call
<
Venter
.
Complaint
>
call
,
Throwable
t
)
{
if
(
t
!=
null
)
{
Log
.
i
(
TAG
,
"error and t = "
+
t
.
toString
());
}
}
});
});
}
}
...
@@ -95,8 +87,7 @@ public class ComplaintFragment extends Fragment {
...
@@ -95,8 +87,7 @@ public class ComplaintFragment extends Fragment {
if
(
detailedComplaint
!=
null
)
{
if
(
detailedComplaint
!=
null
)
{
viewPager
=
mview
.
findViewById
(
R
.
id
.
tab_viewpager_details
);
viewPager
=
mview
.
findViewById
(
R
.
id
.
tab_viewpager_details
);
if
(
viewPager
!=
null
)
{
if
(
viewPager
!=
null
)
{
Log
.
i
(
TAG
,
"viewPager != null"
);
ComplaintDetailsPagerAdapter
complaintDetailsPagerAdapter
=
new
ComplaintDetailsPagerAdapter
(
getChildFragmentManager
(),
complaintId
,
userId
,
userProfileUrl
);
ComplaintDetailsPagerAdapter
complaintDetailsPagerAdapter
=
new
ComplaintDetailsPagerAdapter
(
getChildFragmentManager
(),
sessionID
,
complaintId
,
userId
,
userProfileUrl
);
viewPager
.
setAdapter
(
complaintDetailsPagerAdapter
);
viewPager
.
setAdapter
(
complaintDetailsPagerAdapter
);
slidingTabLayout
.
setupWithViewPager
(
viewPager
);
slidingTabLayout
.
setupWithViewPager
(
viewPager
);
...
...
app/src/main/java/app/insti/fragment/ComplaintsHomeFragment.java
View file @
087fc7fc
...
@@ -6,7 +6,6 @@ import android.support.v4.app.Fragment;
...
@@ -6,7 +6,6 @@ import android.support.v4.app.Fragment;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v4.widget.SwipeRefreshLayout
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -31,10 +30,9 @@ public class ComplaintsHomeFragment extends Fragment {
...
@@ -31,10 +30,9 @@ public class ComplaintsHomeFragment extends Fragment {
private
static
String
TAG
=
ComplaintsHomeFragment
.
class
.
getSimpleName
();
private
static
String
TAG
=
ComplaintsHomeFragment
.
class
.
getSimpleName
();
private
boolean
isCalled
=
false
;
private
boolean
isCalled
=
false
;
private
TextView
error_message_home
;
private
TextView
error_message_home
;
private
static
String
sID
,
uID
,
uProfileUrl
;
private
static
String
uID
,
uProfileUrl
;
public
static
ComplaintsHomeFragment
getInstance
(
String
sessionID
,
String
userID
,
String
userProfileUrl
)
{
public
static
ComplaintsHomeFragment
getInstance
(
String
userID
,
String
userProfileUrl
)
{
sID
=
sessionID
;
uID
=
userID
;
uID
=
userID
;
uProfileUrl
=
userProfileUrl
;
uProfileUrl
=
userProfileUrl
;
return
new
ComplaintsHomeFragment
();
return
new
ComplaintsHomeFragment
();
...
@@ -57,7 +55,7 @@ public class ComplaintsHomeFragment extends Fragment {
...
@@ -57,7 +55,7 @@ public class ComplaintsHomeFragment extends Fragment {
Bundle
savedInstanceState
)
{
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_complaints_home
,
container
,
false
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_complaints_home
,
container
,
false
);
RecyclerView
recyclerViewHome
=
view
.
findViewById
(
R
.
id
.
recyclerViewHome
);
RecyclerView
recyclerViewHome
=
view
.
findViewById
(
R
.
id
.
recyclerViewHome
);
homeListAdapter
=
new
ComplaintsAdapter
(
getActivity
(),
sID
,
uID
,
uProfileUrl
);
homeListAdapter
=
new
ComplaintsAdapter
(
getActivity
(),
uID
,
uProfileUrl
);
swipeContainer
=
view
.
findViewById
(
R
.
id
.
swipeContainer
);
swipeContainer
=
view
.
findViewById
(
R
.
id
.
swipeContainer
);
error_message_home
=
view
.
findViewById
(
R
.
id
.
error_message_home
);
error_message_home
=
view
.
findViewById
(
R
.
id
.
error_message_home
);
...
@@ -93,16 +91,13 @@ public class ComplaintsHomeFragment extends Fragment {
...
@@ -93,16 +91,13 @@ public class ComplaintsHomeFragment extends Fragment {
private
void
callServerToGetNearbyComplaints
()
{
private
void
callServerToGetNearbyComplaints
()
{
try
{
try
{
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
retrofitInterface
.
getAllComplaints
(
"sessionid="
+
sID
).
enqueue
(
new
Callback
<
List
<
Venter
.
Complaint
>>()
{
retrofitInterface
.
getAllComplaints
(
Utils
.
getSessionIDHeader
()
).
enqueue
(
new
Callback
<
List
<
Venter
.
Complaint
>>()
{
@Override
@Override
public
void
onResponse
(
@NonNull
Call
<
List
<
Venter
.
Complaint
>>
call
,
@NonNull
Response
<
List
<
Venter
.
Complaint
>>
response
)
{
public
void
onResponse
(
@NonNull
Call
<
List
<
Venter
.
Complaint
>>
call
,
@NonNull
Response
<
List
<
Venter
.
Complaint
>>
response
)
{
if
(
response
.
body
()
!=
null
&&
!(
response
.
body
().
isEmpty
()))
{
if
(
response
.
body
()
!=
null
&&
!(
response
.
body
().
isEmpty
()))
{
Log
.
i
(
TAG
,
"response.body != null"
);
Log
.
i
(
TAG
,
"response: "
+
response
.
body
());
initialiseRecyclerView
(
response
.
body
());
initialiseRecyclerView
(
response
.
body
());
swipeContainer
.
setRefreshing
(
false
);
swipeContainer
.
setRefreshing
(
false
);
}
else
{
}
else
{
Log
.
i
(
TAG
,
"response.body is empty"
);
error_message_home
.
setVisibility
(
View
.
VISIBLE
);
error_message_home
.
setVisibility
(
View
.
VISIBLE
);
error_message_home
.
setText
(
getString
(
R
.
string
.
no_complaints
));
error_message_home
.
setText
(
getString
(
R
.
string
.
no_complaints
));
swipeContainer
.
setRefreshing
(
false
);
swipeContainer
.
setRefreshing
(
false
);
...
@@ -111,7 +106,6 @@ public class ComplaintsHomeFragment extends Fragment {
...
@@ -111,7 +106,6 @@ public class ComplaintsHomeFragment extends Fragment {
@Override
@Override
public
void
onFailure
(
@NonNull
Call
<
List
<
Venter
.
Complaint
>>
call
,
@NonNull
Throwable
t
)
{
public
void
onFailure
(
@NonNull
Call
<
List
<
Venter
.
Complaint
>>
call
,
@NonNull
Throwable
t
)
{
Log
.
i
(
TAG
,
"failure"
+
t
.
toString
());
swipeContainer
.
setRefreshing
(
false
);
swipeContainer
.
setRefreshing
(
false
);
error_message_home
.
setVisibility
(
View
.
VISIBLE
);
error_message_home
.
setVisibility
(
View
.
VISIBLE
);
}
}
...
...
app/src/main/java/app/insti/fragment/ComplaintsMeFragment.java
View file @
087fc7fc
...
@@ -25,15 +25,14 @@ import retrofit2.Response;
...
@@ -25,15 +25,14 @@ import retrofit2.Response;
public
class
ComplaintsMeFragment
extends
Fragment
{
public
class
ComplaintsMeFragment
extends
Fragment
{
private
static
String
uID
,
sID
,
uProfileUrl
;
private
static
String
uID
,
uProfileUrl
;
private
ComplaintsAdapter
meListAdapter
;
private
ComplaintsAdapter
meListAdapter
;
private
TextView
error_message_me
;
private
TextView
error_message_me
;
private
SwipeRefreshLayout
swipeContainer
;
private
SwipeRefreshLayout
swipeContainer
;
private
static
String
TAG
=
ComplaintsMeFragment
.
class
.
getSimpleName
();
private
static
String
TAG
=
ComplaintsMeFragment
.
class
.
getSimpleName
();
private
boolean
isCalled
=
false
;
private
boolean
isCalled
=
false
;
public
static
ComplaintsMeFragment
getInstance
(
String
sessionID
,
String
userID
,
String
userProfileUrl
)
{
public
static
ComplaintsMeFragment
getInstance
(
String
userID
,
String
userProfileUrl
)
{
sID
=
sessionID
;
uID
=
userID
;
uID
=
userID
;
uProfileUrl
=
userProfileUrl
;
uProfileUrl
=
userProfileUrl
;
return
new
ComplaintsMeFragment
();
return
new
ComplaintsMeFragment
();
...
@@ -57,7 +56,7 @@ public class ComplaintsMeFragment extends Fragment {
...
@@ -57,7 +56,7 @@ public class ComplaintsMeFragment extends Fragment {
// Inflate the layout for this fragment
// Inflate the layout for this fragment
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_complaints_me
,
container
,
false
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_complaints_me
,
container
,
false
);
RecyclerView
recyclerViewMe
=
view
.
findViewById
(
R
.
id
.
recyclerViewMe
);
RecyclerView
recyclerViewMe
=
view
.
findViewById
(
R
.
id
.
recyclerViewMe
);
meListAdapter
=
new
ComplaintsAdapter
(
getActivity
(),
sID
,
uID
,
uProfileUrl
);
meListAdapter
=
new
ComplaintsAdapter
(
getActivity
(),
uID
,
uProfileUrl
);
swipeContainer
=
view
.
findViewById
(
R
.
id
.
swipeContainer
);
swipeContainer
=
view
.
findViewById
(
R
.
id
.
swipeContainer
);
error_message_me
=
view
.
findViewById
(
R
.
id
.
error_message_me
);
error_message_me
=
view
.
findViewById
(
R
.
id
.
error_message_me
);
...
@@ -93,7 +92,7 @@ public class ComplaintsMeFragment extends Fragment {
...
@@ -93,7 +92,7 @@ public class ComplaintsMeFragment extends Fragment {
private
void
callServerToGetMyComplaints
()
{
private
void
callServerToGetMyComplaints
()
{
try
{
try
{
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
RetrofitInterface
retrofitInterface
=
Utils
.
getRetrofitInterface
();
retrofitInterface
.
getUserComplaints
(
"sessionid="
+
sID
).
enqueue
(
new
Callback
<
List
<
Venter
.
Complaint
>>()
{
retrofitInterface
.
getUserComplaints
(
Utils
.
getSessionIDHeader
()
).
enqueue
(
new
Callback
<
List
<
Venter
.
Complaint
>>()
{
@Override
@Override
public
void
onResponse
(
@NonNull
Call
<
List
<
Venter
.
Complaint
>>
call
,
@NonNull
Response
<
List
<
Venter
.
Complaint
>>
response
)
{
public
void
onResponse
(
@NonNull
Call
<
List
<
Venter
.
Complaint
>>
call
,
@NonNull
Response
<
List
<
Venter
.
Complaint
>>
response
)
{
if
(
response
.
body
()
!=
null
&&
!(
response
.
body
().
isEmpty
()))
{
if
(
response
.
body
()
!=
null
&&
!(
response
.
body
().
isEmpty
()))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment