c.java 2.71 KB
package com.instabug.library.model;

import android.support.annotation.NonNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class c
  implements Serializable
{
  private String a;
  private ArrayList<g> b;
  
  public c(@NonNull String paramString)
  {
    this.a = paramString;
    this.b = new ArrayList();
  }
  
  private g k()
  {
    Object localObject2 = j();
    Object localObject1 = localObject2;
    if (((g)localObject2).k())
    {
      localObject2 = this.b.iterator();
      do
      {
        if (!((Iterator)localObject2).hasNext()) {
          break;
        }
        localObject1 = (g)((Iterator)localObject2).next();
      } while ((((g)localObject1).a() == null) || (((g)localObject1).k()));
    }
    return (g)localObject1;
    return null;
  }
  
  private void l()
  {
    if ((this.b != null) && (this.b.size() == 0)) {
      throw new IllegalStateException("Conversation object without messages!");
    }
  }
  
  public String a()
  {
    return this.a;
  }
  
  public List<g> b()
  {
    return this.b;
  }
  
  public int c()
  {
    l();
    Iterator localIterator = this.b.iterator();
    int i = 0;
    if (localIterator.hasNext())
    {
      if (((g)localIterator.next()).d()) {
        break label47;
      }
      i += 1;
    }
    label47:
    for (;;)
    {
      break;
      return i;
    }
  }
  
  public void d()
  {
    int i = this.b.size() - 1;
    while (i >= 0)
    {
      ((g)this.b.get(i)).a(true);
      i -= 1;
    }
  }
  
  public IssueType e()
  {
    return j().b();
  }
  
  public String f()
  {
    g localg = k();
    if (localg != null) {
      return localg.h();
    }
    return null;
  }
  
  public String g()
  {
    g localg = k();
    if (localg != null) {
      return localg.f();
    }
    return null;
  }
  
  public String h()
  {
    return i().e();
  }
  
  public g i()
  {
    l();
    return (g)this.b.get(this.b.size() - 1);
  }
  
  public g j()
  {
    l();
    int i = this.b.size() - 1;
    while (i >= 0)
    {
      if (((g)this.b.get(i)).a() != null) {
        return (g)this.b.get(i);
      }
      i -= 1;
    }
    return (g)this.b.get(this.b.size() - 1);
  }
  
  public String toString()
  {
    return "Conversation:[" + this.a + ", " + this.b + "]";
  }
  
  public static class a
    implements Comparator<c>
  {
    public int a(c paramc1, c paramc2)
    {
      return com.instabug.library.util.g.b(paramc1.h()).compareTo(com.instabug.library.util.g.b(paramc2.h()));
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/model/c.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */