This commit is contained in:
aozhiwei 2020-06-22 17:08:08 +08:00
parent ab8794a31f
commit 8effa1fd7a
4 changed files with 20 additions and 0 deletions

View File

@ -29,6 +29,10 @@ void Player::Init()
myself.base_data.account_id.size() myself.base_data.account_id.size()
); );
NotifyOnline(); NotifyOnline();
#ifdef DEBUG
red_point_flags_ = 1;
SyncRedPoint();
#endif
} }
void Player::UnInit() void Player::UnInit()
@ -870,3 +874,10 @@ void Player::SyncOtherFriend()
} }
} }
} }
void Player::SyncRedPoint()
{
cs::SMUpdateRedPointNotify notifymsg;
notifymsg.set_red_point_flags(red_point_flags_);
SendMsg(notifymsg);
}

View File

@ -116,12 +116,14 @@ private:
::google::protobuf::Message& msg); ::google::protobuf::Message& msg);
void InternalUpdateUserInfo(); void InternalUpdateUserInfo();
void SyncOtherFriend(); void SyncOtherFriend();
void SyncRedPoint();
private: private:
bool dirty_ = false; bool dirty_ = false;
timer_list* dirty_timer_ = nullptr; timer_list* dirty_timer_ = nullptr;
timer_list* update_user_info_timer_ = nullptr; timer_list* update_user_info_timer_ = nullptr;
long long last_apply_idx_ = 0; long long last_apply_idx_ = 0;
int red_point_flags_ = 0;
std::map<std::string, Friend*> friend_hash_; std::map<std::string, Friend*> friend_hash_;
std::map<long long, FriendApply*> apply_hash_; std::map<long long, FriendApply*> apply_hash_;

View File

@ -65,4 +65,5 @@ enum SMMessageId_e
_SMCustomMsgNotify = 503; _SMCustomMsgNotify = 503;
_SMUserTempCustomDataUpdate = 504; _SMUserTempCustomDataUpdate = 504;
_SMDeleteFriendNotify = 505; _SMDeleteFriendNotify = 505;
_SMUpdateRedPointNotify = 507;
} }

View File

@ -375,3 +375,9 @@ message SMUserTempCustomDataUpdate
optional string account_id = 1; //id optional string account_id = 1; //id
optional MFUserTempCustomData temp_custom_data = 2; // optional MFUserTempCustomData temp_custom_data = 2; //
} }
//
message SMUpdateRedPointNotify
{
optional int32 red_point_flags = 1; // 1<<0:
}