File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
src/main/java/io/nbs/client Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1111import io .nbs .client .ui .frames .MainFrame ;
1212import io .nbs .commons .utils .DataBaseUtil ;
1313import io .nbs .commons .utils .IconUtil ;
14+ import io .nbs .sdk .prot .IPMParser ;
1415import org .apache .commons .lang3 .StringUtils ;
1516import org .apache .ibatis .session .SqlSession ;
1617import org .slf4j .Logger ;
@@ -141,7 +142,8 @@ private boolean needInitConfig(IPFS ipfs) throws IOException {
141142 String peerid = (String )ipfs .id ().get ("ID" );
142143 if (cfg .containsKey (ConfigurationHelper .JSON_NICKNAME_KEY )
143144 && cfg .containsKey (ConfigurationHelper .JSON_CFG_FROMID_KEY )){
144- String nick = (String )cfg .get (ConfigurationHelper .JSON_NICKNAME_KEY );
145+ Object nickObj = cfg .get (ConfigurationHelper .JSON_NICKNAME_KEY );
146+ String nick = IPMParser .urlDecode (nickObj .toString ());
145147 String fromid = (String )cfg .get (ConfigurationHelper .JSON_CFG_FROMID_KEY );
146148 if (StringUtils .isBlank (fromid )||StringUtils .isBlank (nick ))return true ;
147149
@@ -158,7 +160,10 @@ private boolean needInitConfig(IPFS ipfs) throws IOException {
158160 currentPeer .setAvatarSuffix (avatarSuffix .toString ());
159161 }
160162 Object avatarName = cfg .get (ConfigurationHelper .JSON_AVATAR_NAME_KEY );
161- if (avatarName !=null )currentPeer .setAvatarName ((String )avatarName );
163+ if (avatarName !=null ){
164+ String avatarFileName = IPMParser .urlDecode (avatarName .toString ());
165+ currentPeer .setAvatarName (avatarFileName );
166+ }
162167 return false ;
163168 }else {
164169 return true ;
Original file line number Diff line number Diff line change @@ -171,11 +171,13 @@ public void actionPerformed(ActionEvent e) {
171171 *
172172 */
173173 private void initData (){
174- //autoLoadMessage();
175- //autoLoadMessage();
174+
176175 }
177176
178177
178+ /**
179+ *
180+ */
179181 private void autoLoadMessage (){
180182 String congtent = "" ;
181183 long ts = System .currentTimeMillis ();
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ public IMMasterPanel() {
4444 initComponents ();
4545 initView ();
4646
47-
4847 //保持在最后
4948 messageReceiver .startReceiver ();
5049 }
You can’t perform that action at this time.
0 commit comments