|
@@ -53,6 +53,7 @@ import com.cooleshow.teacher.widgets.HomeHotAlbumItemDecoration;
|
|
import com.cooleshow.teacher.widgets.HomeHotMusicSheetItemDecoration;
|
|
import com.cooleshow.teacher.widgets.HomeHotMusicSheetItemDecoration;
|
|
import com.cooleshow.teacher.widgets.dialog.BadgeDesDialog;
|
|
import com.cooleshow.teacher.widgets.dialog.BadgeDesDialog;
|
|
import com.cooleshow.teacher.widgets.dialog.HomeCertTipDialog;
|
|
import com.cooleshow.teacher.widgets.dialog.HomeCertTipDialog;
|
|
|
|
+import com.cooleshow.usercenter.constants.UserConstants;
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
|
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
|
import com.youth.banner.adapter.BannerImageAdapter;
|
|
import com.youth.banner.adapter.BannerImageAdapter;
|
|
@@ -577,8 +578,14 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
//昵称
|
|
//昵称
|
|
if (teacherUserInfo != null) {
|
|
if (teacherUserInfo != null) {
|
|
String teacherName = UserHelper.getTeacherName(teacherUserInfo.username, teacherUserInfo.userId);
|
|
String teacherName = UserHelper.getTeacherName(teacherUserInfo.username, teacherUserInfo.userId);
|
|
|
|
+ mViewBinding.tvTeacherName.setEllipsize(TextUtils.TruncateAt.END);
|
|
if (teacherName.length() > 4) {
|
|
if (teacherName.length() > 4) {
|
|
- mViewBinding.tvTeacherName.setText(teacherName);
|
|
|
|
|
|
+ if (teacherUserInfo.getTenantId() != UserConstants.NO_HAVE_TENANT) {
|
|
|
|
+ mViewBinding.tvTeacherName.setText(String.format("%s%s", teacherUserInfo.getTenantName(), teacherName));
|
|
|
|
+ mViewBinding.tvTeacherName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
|
|
|
+ } else {
|
|
|
|
+ mViewBinding.tvTeacherName.setText(teacherName);
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
mViewBinding.tvTeacherName.setText(String.format("你好,%s", teacherName));
|
|
mViewBinding.tvTeacherName.setText(String.format("你好,%s", teacherName));
|
|
}
|
|
}
|