File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
chat/src/main/java/cn/wildfire/chat/app/main Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 3737import cn .wildfire .chat .kit .third .location .ui .adapter .CommonFragmentPagerAdapter ;
3838import cn .wildfire .chat .kit .third .utils .UIUtils ;
3939import cn .wildfire .chat .kit .user .ChangeMyNameActivity ;
40+ import cn .wildfire .chat .kit .user .UserInfoActivity ;
4041import cn .wildfire .chat .kit .user .UserViewModel ;
4142import cn .wildfirechat .chat .R ;
4243import cn .wildfirechat .model .Conversation ;
@@ -247,7 +248,7 @@ private void onScanPcQrCode(String qrcode) {
247248 pcLogin (value );
248249 break ;
249250 case Config .QR_CODE_PREFIX_USER :
250- addFriend (value );
251+ showUser (value );
251252 break ;
252253 case Config .QR_CODE_PREFIX_GROUP :
253254 joinGroup (value );
@@ -264,8 +265,16 @@ private void pcLogin(String token) {
264265 startActivity (intent );
265266 }
266267
267- private void addFriend (String uid ) {
268+ private void showUser (String uid ) {
268269
270+ UserViewModel userViewModel = ViewModelProviders .of (this ).get (UserViewModel .class );
271+ UserInfo userInfo = userViewModel .getUserInfo (uid , true );
272+ if (userInfo == null ) {
273+ return ;
274+ }
275+ Intent intent = new Intent (this , UserInfoActivity .class );
276+ intent .putExtra ("userInfo" , userInfo );
277+ startActivity (intent );
269278 }
270279
271280 private void joinGroup (String groupId ) {
You can’t perform that action at this time.
0 commit comments