Added result code to ignore/unignore calls
Add ignore/unignore calls that take the user ID to avoid double api calls Fully implement the account popup ignore/unignore feature Fix #247
This commit is contained in:
@@ -71,8 +71,53 @@ private:
|
||||
User popupWidgetUser;
|
||||
|
||||
struct {
|
||||
bool following = false;
|
||||
bool ignoring = false;
|
||||
void reset()
|
||||
{
|
||||
this->following = -1;
|
||||
this->ignoring = -1;
|
||||
}
|
||||
|
||||
bool isFollowing() const
|
||||
{
|
||||
return this->following == 1;
|
||||
}
|
||||
|
||||
bool isFollowingSet() const
|
||||
{
|
||||
return this->following != -1;
|
||||
}
|
||||
|
||||
void setFollowing(bool newVal)
|
||||
{
|
||||
if (newVal) {
|
||||
this->following = 1;
|
||||
} else {
|
||||
this->following = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool isIgnoring() const
|
||||
{
|
||||
return this->ignoring == 1;
|
||||
}
|
||||
|
||||
bool isIgnoringSet() const
|
||||
{
|
||||
return this->ignoring != -1;
|
||||
}
|
||||
|
||||
void setIgnoring(bool newVal)
|
||||
{
|
||||
if (newVal) {
|
||||
this->ignoring = 1;
|
||||
} else {
|
||||
this->ignoring = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
int following = -1;
|
||||
int ignoring = -1;
|
||||
} relationship;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user