Просмотр исходного кода

1.专业测评添加非空判断

王鹏鹏 3 лет назад
Родитель
Сommit
fdbef72e9a

+ 5 - 1
.idea/misc.xml

@@ -611,10 +611,14 @@
         <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/chat_flow_react_item_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/chat_flow_react_item_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/chat_minimalist_reply_preview_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/chat_minimalist_reply_preview_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/message_adapter_item_content.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/message_adapter_item_content.xml" value="0.23697916666666666" />
+        <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/minimalist_message_adapter_item_content.xml" value="0.23697916666666666" />
+        <entry key="..\:/workspace/hcp-pads/timcommon/src/main/res/layout/profile_icon_view.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res-minimalistui/layout/chat_minimalist_fragment.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res-minimalistui/layout/chat_minimalist_fragment.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res-minimalistui/layout/chat_minimalist_header_layout.xml" value="0.536" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res-minimalistui/layout/chat_minimalist_header_layout.xml" value="0.536" />
-        <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res-minimalistui/layout/chat_react_dialog_layout.xml" value="0.23697916666666666" />
+        <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res-minimalistui/layout/chat_react_dialog_layout.xml" value="0.176" />
+        <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/drawable/chat_bubble_self_cavity_bg.xml" value="0.151" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/chat_end_consultation.xml" value="0.536" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/chat_end_consultation.xml" value="0.536" />
+        <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/chat_reply_details_item_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/forward_chat_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/forward_chat_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/group_receipt_member_item.xml" value="0.6" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/group_receipt_member_item.xml" value="0.6" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/message_adapter_content_reply.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/tuichat/src/main/res/layout/message_adapter_content_reply.xml" value="0.23697916666666666" />

+ 0 - 1
baselib/src/main/java/com/yingyangfly/baselib/dialog/GameLoadingDialog.kt

@@ -79,7 +79,6 @@ class GameLoadingDialog : DialogFragment() {
             if (time == it) {
             if (time == it) {
                 rxTimer.cancel()
                 rxTimer.cancel()
                 onDialogClickListener?.invoke("")
                 onDialogClickListener?.invoke("")
-                dismiss()
             }
             }
         }
         }
     }
     }

+ 1 - 0
baselib/src/main/java/com/yingyangfly/baselib/utils/CommonParam.kt

@@ -15,4 +15,5 @@ object CommonParam {
     val ORGCODE = "orgCode"
     val ORGCODE = "orgCode"
     val MOBILE = "mobile"
     val MOBILE = "mobile"
     val IDCARD = "idCard"
     val IDCARD = "idCard"
+    val DOCTORAVATAR = "doctor_avatar"
 }
 }

+ 16 - 1
baselib/src/main/java/com/yingyangfly/baselib/utils/User.kt

@@ -10,7 +10,7 @@ object User {
 
 
     val context: Context
     val context: Context
         get() = BaseApplication.appContext
         get() = BaseApplication.appContext
-    
+
     fun saveMobile(mobile: String) {
     fun saveMobile(mobile: String) {
         Preferences.put(CommonParam.MOBILE, mobile)
         Preferences.put(CommonParam.MOBILE, mobile)
     }
     }
@@ -96,6 +96,21 @@ object User {
         }
         }
     }
     }
 
 
+    /**
+     * 保存医生头像
+     */
+    fun saveDoctorAvatar(avatar: String) {
+        Preferences.put(CommonParam.DOCTORAVATAR, avatar)
+    }
+
+    fun getDoctorAvatar(): String {
+        return if (Preferences.getString(CommonParam.DOCTORAVATAR).isNullOrEmpty()) {
+            ""
+        } else {
+            Preferences.getString(CommonParam.DOCTORAVATAR)!!
+        }
+    }
+
     /**
     /**
      * 保存患者头像
      * 保存患者头像
      */
      */

+ 1 - 0
game/src/main/java/com/yingyangfly/game/introduction/GameIntroductionActivity.kt

@@ -63,6 +63,7 @@ class GameIntroductionActivity :
             val gameLoadingDialog = GameLoadingDialog()
             val gameLoadingDialog = GameLoadingDialog()
             gameLoadingDialog.onDialogClickListener = {
             gameLoadingDialog.onDialogClickListener = {
                 speak()
                 speak()
+                gameLoadingDialog.dismiss()
             }
             }
             gameLoadingDialog.show(supportFragmentManager, "gameLoadingDialog")
             gameLoadingDialog.show(supportFragmentManager, "gameLoadingDialog")
         }
         }

+ 0 - 9
timcommon/src/main/java/com/tencent/qcloud/tuikit/timcommon/classicui/widget/message/MessageContentHolder.java

@@ -333,15 +333,6 @@ public abstract class MessageContentHolder<T extends TUIMessageBean> extends Mes
                 rightUserIcon.setVisibility(View.GONE);
                 rightUserIcon.setVisibility(View.GONE);
             }
             }
         }
         }
-        if (properties.getAvatar() != 0) {
-            leftUserIcon.setDefaultImageResId(properties.getAvatar());
-            rightUserIcon.setDefaultImageResId(properties.getAvatar());
-        } else {
-            leftUserIcon.setDefaultImageResId(
-                TUIThemeManager.getAttrResId(leftUserIcon.getContext(), R.attr.core_default_user_icon));
-            rightUserIcon.setDefaultImageResId(
-                TUIThemeManager.getAttrResId(rightUserIcon.getContext(), R.attr.core_default_user_icon));
-        }
         if (properties.getAvatarRadius() != 0) {
         if (properties.getAvatarRadius() != 0) {
             leftUserIcon.setRadius(properties.getAvatarRadius());
             leftUserIcon.setRadius(properties.getAvatarRadius());
             rightUserIcon.setRadius(properties.getAvatarRadius());
             rightUserIcon.setRadius(properties.getAvatarRadius());

+ 4 - 0
timcommon/src/main/java/com/tencent/qcloud/tuikit/timcommon/component/gatherimage/UserIconView.java

@@ -9,7 +9,11 @@ import com.tencent.qcloud.tuikit.timcommon.R;
 
 
 import java.util.List;
 import java.util.List;
 
 
+/**
+ * @author 王鹏鹏
+ */
 public class UserIconView extends RelativeLayout {
 public class UserIconView extends RelativeLayout {
+
     private SynthesizedImageView mIconView;
     private SynthesizedImageView mIconView;
     private int mDefaultImageResId;
     private int mDefaultImageResId;
     private int mIconRadius;
     private int mIconRadius;

+ 6 - 58
timcommon/src/main/java/com/tencent/qcloud/tuikit/timcommon/component/impl/GlideEngine.java

@@ -1,21 +1,23 @@
 package com.tencent.qcloud.tuikit.timcommon.component.impl;
 package com.tencent.qcloud.tuikit.timcommon.component.impl;
 
 
-import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap;
-import android.net.Uri;
 import android.widget.ImageView;
 import android.widget.ImageView;
+
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.Glide;
-import com.bumptech.glide.Priority;
 import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
 import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
 import com.bumptech.glide.request.RequestListener;
 import com.bumptech.glide.request.RequestListener;
 import com.bumptech.glide.request.RequestOptions;
 import com.bumptech.glide.request.RequestOptions;
 import com.tencent.qcloud.tuicore.TUILogin;
 import com.tencent.qcloud.tuicore.TUILogin;
 import com.tencent.qcloud.tuicore.TUIThemeManager;
 import com.tencent.qcloud.tuicore.TUIThemeManager;
 import com.tencent.qcloud.tuikit.timcommon.R;
 import com.tencent.qcloud.tuikit.timcommon.R;
-import java.io.File;
+
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutionException;
 
 
+/**
+ * @author 王鹏鹏
+ */
 public class GlideEngine {
 public class GlideEngine {
+
     public static void loadCornerImageWithoutPlaceHolder(ImageView imageView, String filePath, RequestListener listener, float radius) {
     public static void loadCornerImageWithoutPlaceHolder(ImageView imageView, String filePath, RequestListener listener, float radius) {
         RoundedCorners transform = null;
         RoundedCorners transform = null;
         if ((int) radius > 0) {
         if ((int) radius > 0) {
@@ -33,14 +35,6 @@ public class GlideEngine {
         Glide.with(TUILogin.getAppContext()).clear(imageView);
         Glide.with(TUILogin.getAppContext()).clear(imageView);
     }
     }
 
 
-    public static void loadImage(ImageView imageView, String filePath, RequestListener listener) {
-        Glide.with(TUILogin.getAppContext())
-            .load(filePath)
-            .listener(listener)
-            .apply(new RequestOptions().error(TUIThemeManager.getAttrResId(TUILogin.getAppContext(), R.attr.core_default_user_icon)))
-            .into(imageView);
-    }
-
     public static void loadImage(ImageView imageView, String filePath) {
     public static void loadImage(ImageView imageView, String filePath) {
         Glide.with(TUILogin.getAppContext())
         Glide.with(TUILogin.getAppContext())
             .load(filePath)
             .load(filePath)
@@ -48,32 +42,6 @@ public class GlideEngine {
             .into(imageView);
             .into(imageView);
     }
     }
 
 
-    public static void loadImage(ImageView imageView, Uri uri) {
-        if (uri == null) {
-            return;
-        }
-        Glide.with(TUILogin.getAppContext())
-            .load(uri)
-            .apply(new RequestOptions().error(TUIThemeManager.getAttrResId(TUILogin.getAppContext(), R.attr.core_default_user_icon)))
-            .into(imageView);
-    }
-
-    public static void loadImage(String filePath, String url) {
-        try {
-            File file = Glide.with(TUILogin.getAppContext()).asFile().load(url).submit().get();
-            File destFile = new File(filePath);
-            file.renameTo(destFile);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        } catch (ExecutionException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void loadImage(Context context, int resizeX, int resizeY, ImageView imageView, Uri uri) {
-        Glide.with(context).load(uri).apply(new RequestOptions().override(resizeX, resizeY).priority(Priority.HIGH).fitCenter()).into(imageView);
-    }
-
     public static void loadImage(ImageView imageView, Object uri) {
     public static void loadImage(ImageView imageView, Object uri) {
         if (uri == null) {
         if (uri == null) {
             return;
             return;
@@ -96,10 +64,6 @@ public class GlideEngine {
             .into(imageView);
             .into(imageView);
     }
     }
 
 
-    public static void loadUserIcon(ImageView imageView, Object uri, int defaultResId, int radius) {
-        Glide.with(TUILogin.getAppContext()).load(uri).placeholder(defaultResId).apply(new RequestOptions().centerCrop().error(defaultResId)).into(imageView);
-    }
-
     public static Bitmap loadBitmap(Object imageUrl, int targetImageSize) throws InterruptedException, ExecutionException {
     public static Bitmap loadBitmap(Object imageUrl, int targetImageSize) throws InterruptedException, ExecutionException {
         if (imageUrl == null) {
         if (imageUrl == null) {
             return null;
             return null;
@@ -111,20 +75,4 @@ public class GlideEngine {
             .into(targetImageSize, targetImageSize)
             .into(targetImageSize, targetImageSize)
             .get();
             .get();
     }
     }
-
-    public static Bitmap loadBitmap(Object imageUrl, int width, int height) throws InterruptedException, ExecutionException {
-        if (imageUrl == null) {
-            return null;
-        }
-        return Glide.with(TUILogin.getAppContext())
-            .asBitmap()
-            .load(imageUrl)
-            .apply(new RequestOptions().error(TUIThemeManager.getAttrResId(TUILogin.getAppContext(), R.attr.core_default_user_icon)))
-            .into(width, height)
-            .get();
-    }
-
-    public static void loadImageSetDefault(ImageView imageView, Object uri, int defaultResId) {
-        Glide.with(TUILogin.getAppContext()).load(uri).placeholder(defaultResId).apply(new RequestOptions().centerCrop().error(defaultResId)).into(imageView);
-    }
 }
 }

+ 0 - 2
timcommon/src/main/res/layout/message_adapter_item_content.xml

@@ -52,7 +52,6 @@
             android:layout_alignParentTop="true"
             android:layout_alignParentTop="true"
             android:layout_marginRight="11.52dp"
             android:layout_marginRight="11.52dp"
             android:visibility="gone"
             android:visibility="gone"
-            app:default_image="?attr/core_default_user_icon"
             app:image_radius="20dp"
             app:image_radius="20dp"
             tools:visibility="visible" />
             tools:visibility="visible" />
 
 
@@ -64,7 +63,6 @@
             android:layout_alignParentTop="true"
             android:layout_alignParentTop="true"
             android:layout_marginLeft="11.52dp"
             android:layout_marginLeft="11.52dp"
             android:visibility="gone"
             android:visibility="gone"
-            app:default_image="?attr/core_default_user_icon"
             app:image_radius="20dp" />
             app:image_radius="20dp" />
 
 
         <TextView
         <TextView

+ 0 - 2
timcommon/src/main/res/layout/minimalist_message_adapter_item_content.xml

@@ -44,7 +44,6 @@
         android:layout_marginEnd="8dp"
         android:layout_marginEnd="8dp"
         android:layout_toEndOf="@id/select_checkbox"
         android:layout_toEndOf="@id/select_checkbox"
         android:visibility="gone"
         android:visibility="gone"
-        app:default_image="?attr/core_default_user_icon"
         app:image_radius="20dp"
         app:image_radius="20dp"
         tools:visibility="visible" />
         tools:visibility="visible" />
 
 
@@ -56,7 +55,6 @@
         android:layout_alignParentRight="true"
         android:layout_alignParentRight="true"
         android:layout_marginStart="8dp"
         android:layout_marginStart="8dp"
         android:visibility="gone"
         android:visibility="gone"
-        app:default_image="?attr/core_default_user_icon"
         app:image_radius="20dp"
         app:image_radius="20dp"
         tools:visibility="visible" />
         tools:visibility="visible" />
 
 

+ 0 - 1
tuichat/src/main/res/layout/chat_reply_details_item_layout.xml

@@ -16,7 +16,6 @@
         android:layout_alignParentLeft="true"
         android:layout_alignParentLeft="true"
         android:layout_alignParentTop="true"
         android:layout_alignParentTop="true"
         android:layout_marginRight="6.23dp"
         android:layout_marginRight="6.23dp"
-        app:default_image="?attr/core_default_user_icon"
         app:image_radius="4dp"
         app:image_radius="4dp"
         tools:visibility="visible"/>
         tools:visibility="visible"/>