File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
xabber/src/main/java/com/xabber/android/data/roster Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 28
28
import com .xabber .android .data .account .listeners .OnAccountEnabledListener ;
29
29
import com .xabber .android .data .connection .ConnectionItem ;
30
30
import com .xabber .android .data .connection .ConnectionManager ;
31
+ import com .xabber .android .data .connection .ConnectionState ;
31
32
import com .xabber .android .data .connection .ConnectionThread ;
32
33
import com .xabber .android .data .connection .listeners .OnDisconnectListener ;
33
34
import com .xabber .android .data .entity .BaseEntity ;
@@ -128,7 +129,8 @@ public Collection<RosterContact> getContacts() {
128
129
private void requestRosterReloadIfNeeded () {
129
130
for (String account : AccountManager .getInstance ().getAccounts ()) {
130
131
final Roster roster = RosterManager .getInstance ().getRoster (account );
131
- if (roster != null && !roster .isLoaded ()) {
132
+ if (roster != null && !roster .isLoaded ()
133
+ && AccountManager .getInstance ().getAccount (account ).getState () == ConnectionState .connected ) {
132
134
try {
133
135
roster .reload ();
134
136
} catch (SmackException .NotLoggedInException | SmackException .NotConnectedException e ) {
You can’t perform that action at this time.
0 commit comments